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
Instead of purging and installing
empathy, you could have just done
apt-get -t wheezy empathy to install the wheezy version.