Aptitude wants to remove all of gnome

If none of the more specific forums is the right place to ask

Aptitude wants to remove all of gnome

Postby moezzie » 2009-05-12 11:48

Hey there guys!

I recently installed Debian Lenny on my desktop, ive been running Debian etch on my server for quite some time now and i love it.

Anyways, everything worked find till i had to install build essential( aptitude install build-essential linux-headers-$(uname -r) ) for my nvidia drivers. Upon looking though the list of components up for installation and removal i notice that the removal list was huge. I thought this was kind of odd but still trusted aptitude to do the right thing so i hit enter. After everything finished pretty much all of gnome was gone...
So i went ahead and aptitude install gnome, and i got pretty much all of my packages back, except there are still about 330 packages in my aptitude removal list.
Aptitude seems to think that they are unnecessary and wants to remove them all. The list contains everything from gnome-network-manager to xsane to gedit...

How can i tell aptitude otherwise?

Thanks in advance!
moezzie
 
Posts: 2
Joined: 2009-05-12 11:29

Re: Aptitude wants to remove all of gnome

Postby Telemachus » 2009-05-12 12:09

moezzie wrote:Hey there guys!

I recently installed Debian Lenny on my desktop, ive been running Debian etch on my server for quite some time now and i love it.

Anyways, everything worked find till i had to install build essential( aptitude install build-essential linux-headers-$(uname -r) ) for my nvidia drivers. Upon looking though the list of components up for installation and removal i notice that the removal list was huge. I thought this was kind of odd but still trusted aptitude to do the right thing so i hit enter. After everything finished pretty much all of gnome was gone...
So i went ahead and aptitude install gnome, and i got pretty much all of my packages back, except there are still about 330 packages in my aptitude removal list.
Aptitude seems to think that they are unnecessary and wants to remove them all. The list contains everything from gnome-network-manager to xsane to gedit...

How can i tell aptitude otherwise?

Thanks in advance!

This is a well-known issue. In a nutshell, you installed Gnome via a metapackage. Metapackages are wrappers that help you to install and update a huge collection of items easily. The price you pay is that each of the individual packages is required in order for aptitude to keep all the rest. Therefore, if you remove even a small, apparently inconsequential piece of Gnome (which you probably did inadvertently), aptitude will cheerfully tell you "Ok, Gnome's got to go."

There are a couple of options to handle this:
  • Don't install the metapackage to begin with. Install all the individual items you want one by one. (Pros: no metapackage problem; no bloat of items you really don't want. Con: no metapackage convenience.)
  • Install the metapackage, but if you need to remove one bit, do it in a special way:
    Code: Select all
    apt-get remove <one bit>
    aptitude keep-all

    Apt-get can surgically remove one item, and then if you tell aptitude keep-all, it won't later try to remove all your other Gnome stuff.
For you now, you can either run the aptitude keep-all command or let aptitude remove it all and then reinstall what you really want yourself. (As a start, you will almost certainly want gnome-core, which is itself a meta-package, but much smaller and more reasonable than gnome or gnome-desktop-environment.) The first method is quicker, but I prefer the second (cleaner, lighter, I'm more in control). It's up to you, though.

As a more general rule (a lot of people have learned this recently in testing), do not simply trust aptitude (or apt-get or any other computer program) to "do the right thing." Check the output carefully, and if you're not sure, say no and post a question somewhere.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 4676
Joined: 2006-12-25 15:53

Re: Aptitude wants to remove all of gnome

Postby Bulkley » 2009-05-12 18:42

The aptitude keep-all instruction will stabilize your system. It's a good one.

Telemachus is right, always read what Aptitude or Apt-get tell you. There is always a pause with a list of what it is going to do. You have a chance to say, "No."
Bulkley
 
Posts: 4022
Joined: 2006-02-11 18:35

Re: Aptitude wants to remove all of gnome

Postby bugsbunny » 2009-05-12 20:23

I like the auto-remove features and hate running keep-all, since I think it turns of the auto-installed status on all those packages. What I rather do is find a key package, or 2, or 3, that all those other packages rdepend on and then turn of the auto-install just for those packages. You can do that from within aptitude when it asks if you want to continue (y,n,?). If you enter ? you'll see your options, but basically entering &m<packagename> at that prompt will mark the package as manually installed, preventing the removal of that package and anything in it's dependency list. aptitude will then give you the same prompt, after changing it's list, giving you another opportunity to mark another package as manually installed, proceed, or stop etc.

I very rarely use keep-all :) But it's a good feature when you need/want it. You can also completely turn off auto-remove, or turn it off for certain packages etc. (which is why kernel images are never auto-removed. See /etc/apt/apt.conf.d/01autoremove for why that is.

The aptitude manual is definitely worth a read through to become familiar with the options, or at least the sections related to how you use it (eg I don't bother with the ncurses interface parts).
User avatar
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

Re: Aptitude wants to remove all of gnome

Postby moezzie » 2009-05-13 01:13

Very good explanation Telemachus!

I ended up just reinstalling Lenny and unchecking the Desktop Environment when prompted. On top of that i put xserver-xorg-core, gdm and gnome-core. This gave a nice and clean minimal install. Everything works great now!
Thansk guys, you are all really helpful!
moezzie
 
Posts: 2
Joined: 2009-05-12 11:29

Re: Aptitude wants to remove all of gnome

Postby jongi » 2009-05-21 10:46

This has saved me a whole lot of frustartion
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit
jongi
 
Posts: 477
Joined: 2007-04-15 02:41

Re: Aptitude wants to remove all of gnome

Postby Gloom Demon » 2009-08-03 11:26

Thank's for a clear and helpfull explanation :-)
Do I understand it correctly, that metapackages do not have a hierarchical structure and that is the problem?
Gloom Demon
 
Posts: 25
Joined: 2007-01-29 10:52

Re: Aptitude wants to remove all of gnome

Postby Telemachus » 2009-08-03 11:45

Gloom Demon wrote:Do I understand it correctly, that metapackages do not have a hierarchical structure and that is the problem?

I'm not quite sure what you mean. The structure of metapackages is hierarchical in a sense, but maybe not the sense you mean? You explicitly install only one item (the metapackage itself, which is just a wrapper), and all the actual packages that you want get pulled in as dependencies (or as further dependencies of those initial dependencies). I suppose I would say that the structure is a bit like the standard idea of a single root with lots of branches going in different directions from there, but I'm not sure that really answers your question.

Here's a more concrete example. Let's say I decide (suprisingly) that I want to ditch Openbox and switch to Gnome. I could do this easily by simply installing the meta of all metamonsters gnome.

Code: Select all
telemachus ~ $ aptitude -s install gnome
<snip>
The following NEW packages will be installed:
  alacarte{a} app-install-data{a} arj{a} aspell{a} avahi-daemon{a}
  bluez-gnome{a} capplets-data{a} cdrdao{a} cheese{a} deskbar-applet{a}
  desktop-base{a} dvd+rw-tools{a} ekiga{a} eog{a} epiphany-browser{a}
  epiphany-browser-data{a} epiphany-extensions{a} epiphany-gecko{a}
  esound-common{a} evince{a} evolution{a} evolution-common{a}
  evolution-data-server{a} evolution-data-server-common{a}
  evolution-exchange{a} evolution-plugins{a} evolution-webcal{a}
  fast-user-switch-applet{a} file-roller{a} gcalctool{a} gconf-editor{a}
  gdm{a} gdm-themes{a} gedit{a} gedit-common{a} genisoimage{a} gnome
  gnome-about{a} gnome-app-install{a} gnome-applets{a}
  gnome-applets-data{a} gnome-backgrounds{a} gnome-cards-data{a}
  gnome-control-center{a} gnome-core{a} gnome-desktop-data{a}
  gnome-desktop-environment{a} gnome-doc-utils{a} gnome-games{a}
  gnome-games-data{a} gnome-media{a} gnome-media-common{a} gnome-menus{a}
  gnome-mime-data{a} gnome-mount{a} gnome-netstatus-applet{a}
  gnome-nettool{a} gnome-network-admin{a} gnome-panel{a}
  gnome-panel-data{a} gnome-power-manager{a} gnome-screensaver{a}
  gnome-session{a} gnome-settings-daemon{a} gnome-spell{a}
  gnome-system-monitor{a} gnome-system-tools{a} gnome-terminal{a}
  gnome-terminal-data{a} gnome-themes{a} gnome-themes-extras{a}
  gnome-user-guide{a} gnome-utils{a} gnome-vfs-obexftp{a}
  gnome-volume-manager{a} gnuchess{a} gstreamer0.10-alsa{a}
  gstreamer0.10-ffmpeg{a} gstreamer0.10-gnomevfs{a}
  gstreamer0.10-plugins-base{a} gstreamer0.10-plugins-good{a}
  gstreamer0.10-plugins-ugly{a} gstreamer0.10-tools{a} gstreamer0.10-x{a}
  gtkhtml3.14{a} gucharmap{a} guile-1.8-libs{a} hal{a} hal-info{a}
  iso-codes{a} libapm1{a} libavahi-core5{a} libavahi-gobject0{a}
  libavahi-ui0{a} libbluetooth2{a} libbonobo2-0{a} libbonobo2-common{a}
  libbonoboui2-0{a} libbonoboui2-common{a} libcairomm-1.0-1{a}
  libcamel1.2-11{a} libcupsys2{a} libdaemon0{a} libdmx1{a} libdv4{a}
  libebook1.2-9{a} libecal1.2-7{a} libedata-book1.2-2{a}
  libedata-cal1.2-6{a} libedataserver1.2-9{a} libedataserverui1.2-8{a}
  libeel2-2.20{a} libeel2-data{a} libegroupwise1.2-13{a} libepc-1.0-1{a}
  libepc-ui-1.0-1{a} libesd0{a} libexchange-storage1.2-3{a} libexempi3{a}
  libgalago3{a} libgda3-3{a} libgda3-common{a} libgdata-google1.2-1{a}
  libgdata1.2-1{a} libgdl-1-0{a} libgdl-1-common{a} libggz2{a}
  libggzcore9{a} libggzmod4{a} libgksu1.2-0{a} libgksuui1.0-1{a}
  libglibmm-2.4-1c2a{a} libgmyth0{a} libgnome-desktop-2{a}
  libgnome-media0{a} libgnome-menu2{a} libgnome-pilot2{a}
  libgnome-window-settings1{a} libgnome2-0{a} libgnome2-canvas-perl{a}
  libgnome2-common{a} libgnome2-perl{a} libgnome2-vfs-perl{a}
  libgnomecups1.0-1{a} libgnomekbd-common{a} libgnomekbd2{a}
  libgnomekbdui2{a} libgnomeprint2.2-0{a} libgnomeprint2.2-data{a}
  libgnomeprintui2.2-0{a} libgnomeprintui2.2-common{a} libgnomeui-0{a}
  libgnomeui-common{a} libgnomevfs2-0{a} libgnomevfs2-bin{a}
  libgnomevfs2-common{a} libgnomevfs2-extra{a} libgpod3{a}
  libgstreamer-plugins-base0.10-0{a} libgtk-vnc-1.0-0{a}
  libgtkhtml3.14-19{a} libgtkmm-2.4-1c2a{a} libgtksourceview-common{a}
  libgtksourceview1.0-0{a} libgtksourceview2.0-0{a}
  libgtksourceview2.0-common{a} libgucharmap6{a} libgweather-common{a}
  libgweather1{a} libmetacity0{a} libmtp7{a} libmusicbrainz4c2a{a}
  libnautilus-burn4{a} libnautilus-extension1{a} libnet-dbus-perl{a}
  libnm-glib0{a} liboobs-1-4{a} libopal-2.2{a} libopenobex1{a} libosp5{a}
  libpam-gnome-keyring{a} libpanel-applet2-0{a} libpisock9{a} libpisync1{a}
  libpt-1.10.10{a} libpt-1.10.10-plugins-alsa{a}
  libpt-1.10.10-plugins-v4l{a} librarian0{a} libsidplay1{a} libslab0{a}
  libsoup2.4-1{a} libspectre1{a} libspeexdsp1{a} libswfdec-0.6-90{a}
  libtotem-plparser10{a} libtrackerclient0{a} libvisual-0.4-0{a}
  libvte-common{a} libvte9{a} libxklavier12{a} libxml-twig-perl{a}
  libxml2-utils{a} lsb-release{a} menu-xdg{a} metacity{a}
  metacity-common{a} nautilus{a} nautilus-cd-burner{a} nautilus-data{a}
  notification-daemon{a} pm-utils{a} powermgmt-base{a} python-4suite-xml{a}
  python-apt{a} python-cups{a} python-cupsutils{a} python-dbus{a}
  python-eggtrayicon{a} python-elementtree{a} python-gdata{a}
  python-gdbm{a} python-gmenu{a} python-gnome2{a} python-gnome2-desktop{a}
  python-gnome2-extras{a} python-gst0.10{a} python-gtkhtml2{a}
  python-gtkmozembed{a} python-gtksourceview2{a} python-libxml2{a}
  python-notify{a} python-pyorbit{a} python-sexy{a} python-xdg{a}
  rhythmbox{a} seahorse{a} serpentine{a} sound-juicer{a} swfdec-gnome{a}
  swfdec-mozilla{a} synaptic{a} system-config-printer{a}
  system-tools-backends{a} totem-common{a} totem-gstreamer{a}
  totem-mozilla{a} totem-plugins{a} transmission-common{a}
  transmission-gtk{a} vinagre{a} vino{a} w3c-dtd-xhtml{a} wodim{a}
  xbase-clients{a} xsltproc{a} xulrunner-1.9-gnome-support{a} yelp{a}
<snip>
0 packages upgraded, 257 newly installed, 0 to remove and 0 not upgraded.
Need to get 285MB/293MB of archives. After unpacking 734MB will be used.
Do you want to continue? [Y/n/?]

Aptitude helpfully marks items that will be automatically installed as a dependency with {a}. Notice that only the wrapper itself, gnome, is not marked that way. The upshot of this is what I described above. If you try to remove any tiny little bit of all that later, everything that is connected by automatic dependencies from the same chain gets the "to-be-removed" mark. Maybe the largest remaining difference between package managers is how they respond to that mark:

  • aptitude tries to immediately remove items with the mark
  • apt-get pesters you to run autoremove and remove the marked items
  • synaptic does I don't-know-what, since I never use it.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 4676
Joined: 2006-12-25 15:53

Re: Aptitude wants to remove all of gnome

Postby bugsbunny » 2009-08-03 14:39

Note that a metapackage can install other metapackages. For example using gnome from the previous post it installs (among other things) gnome-desktop-environment, which is another metapackage, which also includes a metapackage among it's dependencies (gnome-core).

Actually the list above shows everything that would be installed. The actual dependency list for gnome is somewhat shorter. (The following is for squeeze, lenny may be a bit different - especially as to explicit versions)
Code: Select all
Depends: gnome-desktop-environment (= 1:2.24.3~2squeeze2.1), gdm-themes,
         gnome-themes-extras, gnome-games (>= 1:2.24.3), libpam-gnome-keyring
         (>= 2.24.1), gstreamer0.10-plugins-ugly (>= 0.10.10),
         gstreamer0.10-ffmpeg (>= 0.10.6), rhythmbox (>= 0.12), synaptic (>=
         0.62), system-config-printer (>= 1.0.0), totem-mozilla, swfdec-mozilla,
         epiphany-extensions, gedit-plugins, evolution-plugins (>= 2.24.3),
         evolution-exchange (>= 2.24.3), evolution-webcal (>= 2.24.0),
         serpentine, gnome-app-install, transmission-gtk, gnome-bluetooth, arj,
         avahi-daemon, network-manager-gnome | gnome-network-admin (>= 2.22.1)
Recommends: gnome-games-extra-data (>= 2.24.0), epiphany-extensions-more,
            gnome-office (= 1:2.24.3~2squeeze2.1), tomboy (>= 0.12.2),
            update-notifier, gparted, tsclient, hal-cups-utils, gthumb, liferea
            | evolution-rss | blam, menu-xdg, gdebi, hardinfo
Suggests: gnome-dbg, openoffice.org-gnome, openoffice.org-evolution


Marking gnome-desktop-environment as manually installed rather than auto-installed would prevent a large part of the autoremoval attempts.

Now let's say that you want to run gnome, but not quite all the pieces. But you've already installed the gnome metapackage. You want to remove most of evolution (some pieces probably will have to stay), you want to replace network-manager with wicd, remove swfdec-mozilla (a foss replacement for flash), replace transmission with deluge, and you don't care about bluetooth since you don't have it on this system. Well looking at the gnome dependency list you can start by running:
Code: Select all
aptitude unmarkauto gnome-desktop-environment gdm-themes gnome-themes-extras gnome-games libpam-gnome-keyring gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg rhythmbox synaptic system-config-printer totem-mozilla epiphany-extensions gedit-plugins serpentine gnome-app-install arj avahi-daemon deluge+ wicd+ gnome_ -s
check out what the result would be, make any needed adjustments, then when finally happy remove the -s flag and run it for real as root.

The simulate flag is a wonderful thing. It allows you to experiment with no chance of causing any actual changes, especially if you run as a normal user when using it (aptitude allows you to do that).
User avatar
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

Re: Aptitude wants to remove all of gnome

Postby Telemachus » 2009-08-03 14:55

A quick note: my list of installs is actually smaller than the default for most people, since I have turned off the option to automatically install recommended packages.
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 4676
Joined: 2006-12-25 15:53

Re: Aptitude wants to remove all of gnome+display not working

Postby chhoedin » 2009-08-18 08:20

My whole gnome desktop stopped functioning after I ran an update via the update manager. Finally resolved it with the help of a friend. Had unknowingly pointed to two packages-both lenny and etch......so apparently the updates got all mixed up....even then at first couldn't login the usual way so my friend installed xdm. With that I could now login and my desktop icons had appeared and everything seemed to be working well. But when I started my browser which is iceweasel it wouldn't start. Even the openoffice.org programs fails to load/open. Even my text editor wouldn't open. Error like "gedit libgtk sourceview-2.0.s0.0: undefined symbol: xmlReaderForFd" keep appearing. So basically display is not working...have updated several times. Do i need to switch to gdm instead of xdm if at all it should make any difference. Or is re-installation of linux the only solution? Please help. I am new to linux so I don't know what to do.
chhoedin
 
Posts: 1
Joined: 2009-08-18 06:28

Re: Aptitude wants to remove all of gnome

Postby pnguine » 2010-01-03 02:56

What do you if you want to 'unkeep-all' later?
pnguine
 
Posts: 5
Joined: 2010-01-03 02:53

Re: Aptitude wants to remove all of gnome

Postby Telemachus » 2010-01-03 13:29

pnguine wrote:What do you if you want to 'unkeep-all' later?

I think you can't - at least not straightforwardly. You can change the status of packages in terms of auto-/non-auto-installed one by one, but you would need to have a list of which items you want to change. And it would be tedious as hell.

This is why Bugs says above that he doesn't like this method (I think, among other issues).
"We have not been faced with the need to satisfy someone else's requirements, and for this freedom we are grateful."
Dennis Ritchie and Ken Thompson, The UNIX Time-Sharing System
User avatar
Telemachus
 
Posts: 4676
Joined: 2006-12-25 15:53

Re: Aptitude wants to remove all of gnome

Postby bugsbunny » 2010-01-03 15:50

Telemachus wrote:
pnguine wrote:What do you if you want to 'unkeep-all' later?

I think you can't - at least not straightforwardly. You can change the status of packages in terms of auto-/non-auto-installed one by one, but you would need to have a list of which items you want to change. And it would be tedious as hell.

This is why Bugs says above that he doesn't like this method (I think, among other issues).


That's correct. I've actually taken this a step further. I now have suggests also being treated as auto-installed (setting is in apt.conf). Since I'm running squeeze/sid I cab expect all of the packages to eventually get updated. Each day when I check for updates I first run aptitude search ~U and then, for any packages that aren't marked as being auto-installed, but look like they might be dependencies, I run deborphan to check and then use aptitude markauto on any relevant packages.
User avatar
bugsbunny
 
Posts: 5355
Joined: 2008-07-06 17:04

Re: Aptitude wants to remove all of gnome

Postby pnguine » 2010-01-05 04:43

That's all way beyond my patience/persistence level so I just ran 'keep-all'. So, let's say that affected 60 packages that had been installed by 'gnome' ; would they be the packages that apt-get now says it is 'not removing' (sorry, not sure of the exact phrase and I am not at that box right now), and as those packages get updated by the maintainers would they no longer be in that list?

If I decide that I want to clean all that up by removing gnome and restarting with gnome-core, etc, will I have trouble starting X after removing gnome and before I get a chance to install gnome-core? Or will I be installing gnome-core, etc from the terminal with apt-get?

Also, from bugsbunny above:

I like the auto-remove features and hate running keep-all, since I think it turns of the auto-installed status on all those packages. What I rather do is find a key package, or 2, or 3, that all those other packages rdepend on and then turn of the auto-install just for those packages. You can do that from within aptitude when it asks if you want to continue (y,n,?). If you enter ? you'll see your options, but basically entering &m<packagename> at that prompt will mark the package as manually installed, preventing the removal of that package and anything in it's dependency list. aptitude will then give you the same prompt, after changing it's list, giving you another opportunity to mark another package as manually installed, proceed, or stop etc.


does "turn off the auto-install" refer to the same thing as "mark the package as manually installed" or are they two different things?
pnguine
 
Posts: 5
Joined: 2010-01-03 02:53

Next

Return to General Questions

Who is online

Users browsing this forum: ping_uin and 16 guests

fashionable