I am running a Debian Wheezy install on a system where space is tight. Hence, I've turned off the "Automatically install recommended packages" option. The problem occurs if I install a package which results in a bunch of automatic dependencies. When I then remove that package, aptitude does not remove many of the automatically installed packages, for the reason that they are recommended by other packages. For instance, I installed pybliographer and was required to install almost 45 MB of packages. When I enter aptitude remove pybliographer a few hours later, I'm told that 3 MB will be freed. Trying aptitude why on a few random packages that were earlier installed - e.g. libgnomeui-0 - shows that they are recommended by some other package, but not depended on by any.

The Debian documentation on "managing automatically installed packages" mentions that one can set Apt::AutoRemove::SuggestsImportant to false so that packages are not retained just because they are suggested by another package. But there is no reference to an option to do this for recommended packages - that page states that packages "will be removed when there is no path via Depends, PreDepends, or Recommends to them from a manually installed package." Is there no way this behaviour can be changed?

2 Answers 2


Try aptitude search '!?reverse-depends(~i) ~M !?essential' to list all packages which are marked as automatically installed but have no installed package (hard) depending on it. (Essential packages are excluded as you don't want to remove them anyways.) You can also start an aptitude interactive session with the display filter set to only show such packages with aptitude -o 'Aptitude::Pkg-Display-Limit=!?reverse-depends(~i) ~M !?essential'

See my blog posting "finding packages for deinstallation on the commandline with aptitude" for more details about this topic.

As far as I know there's though no switch to ignore all non-hard reverse dependencies in aptitude by default.

  • I tried the first command, and it still seems to list essential packages - for instance linux-headers-686-pae, which in my case is recommended by one package and depended on by another. Perhaps it's being listed because it's recommended by one package?
    – ShankarG
    Commented Dec 10, 2014 at 3:27
  • No, linux-headers-* are by no means an essential package. You can easily remove it if you don't have packages (e.g. -dkms) which compile a driver from source locally. Actual even linux-image- are essential packages. You don't need them in a chroot for example. Or a an even heavier example: apt is no essential package. You can run a Debian with only dpkg (which is essential), but then you have far less features of course. Commented Dec 10, 2014 at 8:42

But there is no reference to an option to do this for recommended packages ...



You must log in to answer this question.

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