apt-get - autoremove wants to uninstall Gnome
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, ormarkauto
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, orM
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.
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.