As you install packages in your Debian system it is possible that you end up with a bunch of packages that are not needed. These are orphaned packages, packages that are not required by another package. To handle this situation you have the deborphan utility. From the man pages:
deborphan finds packages that have no packages depending on them. The default operation is to search only within the libs and oldlibs sections to hunt down unused libraries.
To install deborphan proceed as usual:
apt-get install deborphan
Now to see orphaned packages simply type…
deborphan
Note that it will not remove the packages listed, it will simply list packages that should be removed. If you want to definitely remove the package…
deborphan | xargs apt-get –purge remove -y
An advice: be carefull to first check what packages are to be removed to avoid potential mistakes of deborphan. For more information take a look at man pages.
Tags: Linux