Debian – How to remove gnome-games package without removing other packages

debianpackage-management

So I want to remove (more exactly purge) some packages like gnome-games from Debian 6. As already expected and know by research Aptitude also wants to remove in example the meta-package gnome, as without the gnome-games the gnome package is not fully installed. No problem with that. But now the difference comes: Aptitude also wants to remove a ton of other important packages! How can I just avoid that? I cannot understand what in example network-manager has to do with gnome-games. Unmarking gnome-games as manually installed does not make a difference.

However, this is my console dump:

root@testing:/home/branch# aptitude purge gnome-games
The following packages will be REMOVED:  
gnome-games{p} 
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 2,490 kB will be freed.
The following packages have unmet dependencies:
gnome: Depends: gnome-games (>= 1:2.30) but it is not going to be installed.
The following actions will resolve these dependencies:

Remove the following packages:
1)     gnome                       

Accept this solution? [Y/n/q/?] Y
The following packages will be REMOVED:
aptdaemon{u} binfmt-support{u} cli-common{u} dnsmasq-base{u} epiphany-extensions{u}
evolution-exchange{u} gdebi{u} gdebi-core{u} gedit-plugins{u} gnome{a}
gnome-codec-install{u} gnome-games{p} gnome-office{u} gnome-themes-extras{u}
gnome-themes-more{u} gtk2-engines-smooth{u} libart2.0-cil{u} libgconf2.0-cil{u} 
libgee2{u} libgexiv2-0{u} libglade2.0-cil{u} libglib2.0-cil{u} libgmime2.4-cil{u} 
libgnome-vfs2.0-cil{u} libgnome2.24-cil{u} libgnomepanel2.24-cil{u} libgpod-common{u}
libgpod4{u} libgtk2.0-cil{u} libmono-addins-gui0.2-cil{u} libmono-addins0.2-cil{u}
libmono-cairo2.0-cil{u} libmono-corlib2.0-cil{u} libmono-i18n-west2.0-cil{u}
libmono-posix2.0-cil{u} libmono-security2.0-cil{u} libmono-sharpzip2.84-cil{u}
libmono-system2.0-cil{u} libmtp8{u} libndesk-dbus-glib1.0-cil{u} libndesk-dbus1.0-cil{u}
libnm-glib-vpn1{u} libpcsclite1{u} liferea{u} liferea-data{u} media-player-info{u}
mobile-broadband-provider-info{u} modemmanager{u} mono-2.0-gac{u} mono-gac{u}
mono-runtime{u} network-manager{u} network-manager-gnome{u} ppp{u} python-aptdaemon{u}
python-aptdaemon-gtk{u} python-mako{u} python-markupsafe{u} python-vte{u}
python-webkit{u} rhythmbox{u} rhythmbox-plugin-cdrecorder{u} rhythmbox-plugins{u}
shotwell{u} simple-scan{u} software-center{u} tcl{u} tcl8.4{u} tomboy{u} totem-mozilla{u}
transmission-common{u} transmission-gtk{u} update-manager-core{u} update-manager-gnome{u}
update-notifier{u} update-notifier-common{u} usb-modeswitch{u} usb-modeswitch-data{u}
wpasupplicant{u}
0 packages upgraded, 0 newly installed, 79 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 143 MB will be freed.
Do you want to continue? [Y/n/?] n
Abort.

Edit: Aptitude wants to remove all the packages as it assumes they are unused after removing the gnome metapackage. But that definitely is not the case. How to tell aptitude that it simply keeps those packages? It does not give any other option.

Best Answer

It appears that all of those were automatically installed as dependencies of the gnome metapackage. As you said, the gnome metapackage is incomplete without the gnome-games package, so it must be removed. That renders all the packages listed unused and so aptitude wants to remove them. There may be a way to remove gnome without removing its unused dependencies, but a quick search didn't show one and I suspect that it would try to uninstall them every time you removed something else. Your best bet is probably to figure out which of those packages you explicitly want and mark them manually installed, then let it uninstall the remainder if they're still unneeded.

Related Question