How to remove an uninstalled package's dependencies?
You can use the command apt-get autoremove
. It will remove packages that are installed as automatic dependencies, but are not depended anymore.
apt-get
has a flag --auto-remove
that can be used to automatically remove the automatically installed packages when removing a manually installed package:
apt-get remove --auto-remove packagename
Certain other tools are also capable of doing this, for example aptitude
will automatically suggest that you remove the packages that have been orphaned.
The automatically installed packages tracking is built in to apt so the tracking should work no matter which tool you use to install the packages.
aptitude purge digikam
deborphan
aptitude purge $(deborphan)
deborphan
lists packages which are not used or do not depend. So you can safely uninstall them. I tend to use purge
as option of aptitude
because it removes also config files and other stuff.
The Computer Janitor, in the system menu can do this too.