Wednesday, June 2, 2010

APT suggests to remove (autoremove) required packages

After another packages update (or after my attempts to remove Evolution out from the system, I do not know exactly) on my Debian Squeeze, APT began to suggest me to remove 'non-required' packages using 'autoremove' option like this:

The following packages were automatically installed and are no longer required: totem-common libempathy-gtk28 libaprutil1-ldap vinagre odbcinst seahorse-plugins libgeoclue0 xdg-user-dirs gnome-user-share libgalago3 libtelepathy-farsight0 gconf-defaults-service guile-1.8-libs unixodbc
...
Use 'apt-get autoremove' to remove them.

It'd be Ok if packages to remove were really non-required for my system. But they ain't! W/o them my Gnome desktop would be definitely broken. Seems that something went wrong with 'Depends' field of some package.

This had been annoying me until I found a solution:

# apt-get install <list-of-packages-suggested-to-remove>

All above-mentioned packages were installed automatically due 'Depends' field of some (name it 'primary') very important package. Hence APT believes that it's Ok to remove them out when the primary package is purged. By explicitly using 'apt-get install' we tell APT that these packages ain't automatically installed anymore but manually. Pretty easy, yeah?

Alternative ways

  • Use 'aptitude unmarkauto' to mark packages manually installed;
  • Update /etc/apt/apt.conf with debug::pkgAutoRemove=false key to disable APT's autoremoving feature.
Enjoy.

No comments:

Post a Comment