As empathy 2.30 in Debian Wheezy didn't meet all my preferences I tried out empathy 3.1 from experimental, using the command:

apt-get -t experimental install empathy

I had to find out, this version of empathy doesn't work well in Gnome 2.x. Therefore I mentioned:

apt-get purge empathy
apt-get install empathy

Hoping, that this will reinstall the "standard" version of empathy again.

So far, everything worked well.

But now:

apt-get autoremove

wants to delete Gnome as a whole.

How can I calm down apt-get autoremove?

4 Answers 4


APT maintains an indicator for each package, telling it whether the package is manually installed (installed because the user/administrator wanted it) or automatically installed (installed only because it's a dependency of some other package). That's what apt-get autoremove uses to determine what to remove: it removes packages that are marked as automatically installed, but that no currently installed package requires.

You need to mark the gnome package, or whatever Gnome package corresponds to the bits you want to keep, as manually installed. It's easiest to do this in an interactive tool with access to the automatically-installed setting:

  • On the command line, call aptitude unmarkauto PACKAGENAME to mark PACKAGENAME as manually installed, or markauto to mark it as automatically installed.
  • In Aptitude, move to the line corresponding to a package, then press m to mark it as manually installed, or M to mark it as automatically installed.
  • In Synaptic, move to the line corresponding to a package, then toggle “Automatically installed” in the “Package” menu.

Note that (at least as of squeeze, I haven't checked wheezy) gnome-desktop-environment depends on all of the official Gnome components, including empathy. I suspect you had gnome-desktop-environment installed, and removing the empathy package had to remove it because of the dependency. If this is the case you should now reinstall gnome-desktop-environment. (If you don't remember, you can find a history of what APT-based package managers did in /var/log/apt.)

Instead of purging and installing empathy, you could have just done apt-get -t wheezy empathy to install the wheezy version.

  • cool! Using this "trick" one could remove Empathy without removing Gnome, right?
    – Marcel
    Jun 5, 2011 at 8:20
  • @Marcel: You can remove Empathy without removing other Gnome components, but the gnome-desktop-environment package depends on empathy, so you must have removed that, and probably want to reinstall it. Jun 5, 2011 at 10:23

You can apt-get install some gnome package (which is already installed) to set it as manually selected (installed). This should introduce the needed dependencies such that autoremove does not want to remove the gnome packages anymore.

I am not using gnome, but probably there is some gnome-desktop package or something like that which pulls in all the main gnome stuff.

For example the output on my system for a non-gnome package:

# apt-get install libsource-highlight3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libsource-highlight3 is already the newest version.
libsource-highlight3 set to manually installed.

libsource-highlight3 was automatically installed as dependency of source-highlight. After the remove of source-highlight, apt-get autoremove would not remove the libsource-highlight3 package, because it is set to manually installed now.

  • Thank you! I followed your suggestion and mentioned apt-get install gnome in the command line. Debian now wants to use 200MB additional diskspace, which I find kind of strange - however, I hope that works.
    – Marcel
    Jun 3, 2011 at 9:04
  • 1
    @Marcel, this should be ok - probably the application package or packages (which pulled your current gnome packaged as dependencies (e.g. empathy) and were later removed) just don't need all of gnome - a main gnome package on the other hand wants to provide the whole gnome desktop, i.e. it depends on all gnome packages which are considered as the default gnome experience. Jun 3, 2011 at 9:12
  • @Marcel: you don't need to do apt-get install gnome. @maxshekepzig was suggesting apt-get install for some package you already have installed. Jun 3, 2011 at 11:02
  • @Faheem you are right. apt-get install gnome would pull all those other packages. Therefore I didn't need to search for a gnome-desktop package (in the meantime I think it's called gnome-core).
    – Marcel
    Jun 5, 2011 at 8:19

Another solution would be to completelly switch off autoremove with these options (in /etc/apt/apt.conf orn in file in /etc/apt/apt.conf.d/ directory):

APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";

Just copy the list of packages apt is wanting to autoremove (use a text editor to remove trailing whitespace). Then sudo apt install <paste list of packages> fixed this issue for me on numerous occasions. Its simply a difference of packages being manually installed (apt thinks you must need these as you installed them) vs. packages being automatically installed (apt installed these so it assumes it can do what it wants with them). By doing th above you tell apt that they are all mannually installed. FYI - I sometimes have to do this twice as it will continue to suggest further autoremoves.

You must log in to answer this question.

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