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.