Remove unnecessary packages.