Apt-get doesn’t completely uninstall dependencies which it has installed

aptpackage-management

I ran sudo apt-get install tor which installed these packages:

The following NEW packages will be installed:
  tor tor-geoipdb torsocks

But when I tried to remove it with sudo apt-get remove tor – providing the same package name (only tor), it is missing torsocks:

The following packages will be REMOVED:
  tor tor-geoipdb

So torsocks stays installed – I really hate this behavior. Why is it happening and how can I fix it? How can I be sure everything what was installed gets removed?

Best Answer

To uninstall a package with all its dependencies you can use --auto-remove

sudo apt-get remove --auto-remove tor

Related Question