cabal: rm redundants and sort packages