Sort packages