It seems aptitude doesn't remove automatically installed packages that are not depended on if these packages are suggested by any other (manually installed) ones.
root@host:/# aptitude install unattended-upgrades
The following NEW packages will be installed:
iso-codes{a} lsb-release{a} python-apt{a} python-apt-common{a} python2.6{a} python2.6-minimal{a} unattended-upgrades
...
root@host:/# aptitude remove unattended-upgrades
The following packages will be REMOVED:
unattended-upgrades
...
root@host:/# aptitude why python-apt
i apt Suggests python-apt
I can (somehow) understand why this is desirable, but is there any way to override it
Best Answer
This behavior is controlled by the option
Apt::AutoRemove::SuggestsImportant
.http://aptitude.alioth.debian.org/doc/en/ch02s05s05.html#configApt-AutoRemove-SuggestsImportant
You can set this option to false in one of aptitude's configuration files, to let aptitude automatically remove packages that are only suggested by other packages. E.g., edit or create /etc/apt/apt.conf and add the following line