Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

This behavior is controlled by the option Apt::AutoRemove::SuggestsImportant.

Option: Apt::AutoRemove::SuggestsImportant

Default: true

Description: If this option is true, then aptitude will not consider packages to be unused (and thus will not automatically remove them) as long as any installed package suggests them. For more information, see the section called “Managing automatically installed packages”.

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

Apt::AutoRemove::SuggestsImportant false;

share|improve this answer

Use

apt-get autoremove unattended-upgrades
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.