Ubuntu – How to Remove Unnecessary Packages

javauninstall

I had installed OpenJDK 7 Runtime (openjdk-7-jre) and when it was installed, it also accompany with lot of package depends, but when i wanted to remove. it just removed openjdk-7-jre size 800 kb, and not removed all OpenJDK 7 Runtime depends. Actually, it become unnecessary packages.

How should I do to fix it?

Best Answer

If the other packages were installed only as dependencies of openjdk-7-jre and you have removed openjdk-7-jre, you should be able to remove those now-unnecessary packages with:

sudo apt-get autoremove

If you want to remove their systemwide configuration files too, run this instead:

sudo apt-get --purge autoremove
Related Question