Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I only want to delete the dependencies if they are not required by any package installed since then.

For example, when I installed subversion, it also installed some libs:

libapr1:amd64 libaprutil1:amd64 libneon27-gnutls:amd64 libsvn1:amd64

I want to purge them also along with subversion if this will not break my system.

I'm looking for an implicit way, eg. aptitude purge subversion and some switches to tell aptitude what I want.

My favourite package manager is pure aptitude.

How to do that on Debian Wheezy?

share|improve this question

You can use the deborphan package to look for libraries no longer fulfilling any dependencies. It will generate a simple list of all these packages.

One can also use this list directly with aptitude by

sudo aptitude purge $(deborphan)

which will send all these supposed unused packages as arguments to aptitude, as one would expect. aptitude will then show you the exact actions that will be taken and their consequences, and if you approve, these packages will be cleared.

deborphan can also be given a package name as argument to act on a single package's dependencies instead of system-wide. As always, see the man page.

share|improve this answer
I still not understand something or it is not working. Tried with python3, which installed the related python3 minimal packages too (python3-minimal:amd64, python3.2:amd64, python3.2-minimal:amd64). Right after that I removed python3 and run you command. I doesn't show anything. – dash17291 Mar 15 '13 at 12:18

you will get some hints anyway after removing 'subversion'. Mostly 'apt-get autoremove --purge' will purge every excess package. I don't use 'aptitude' - possibly there is some equivalent to autoremove.

share|improve this answer

You can also mark packages as being installed automatically which will cause aptitude to suggest removing them when nothing depends on them. You marks the package by pressing M.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .