When removing packages, order them inversely by dependencies, so the post/pre-rm scripts are less likely to fail.