I have within the last year started to experiment with linux in an effort to learn the technical underpinnings as well as the fact that I strongly support the whole idea of open source software. Anyways, two of the distributions that I have spent the most time messing around with are Arch Linux and Ubuntu. I realize they are extremely different but my question today has to do with the package management system.

In arch linux if you would like to remove a package and all of its dependencies you can run a command pacman -Rs [packagename]. To see packages installed as dependencies and no longer needed by any other program you can run pacman -Qdt.

Now in ubuntu or for that matter any other APT based package system you remove packages with something like apt-get remove [packagename] followed by apt-get autoremove to take away dependencies that are no longer needed.

The problem that I seem to be having is that while in Arch linux running something like pacman -Rs gnome will remove gnome and all of the dependencies installed with it and an pacman -Qdt will allow me to make sure nothing is left over, but in ubuntu apt-get remove gnome will only remove the meta package, and then running apt-get autoremove returns nothing.

I was wondering how I could achieve a pacman -Rs type removal on an APT based package system.


The reason why you don't remove what you expect is because gnome metapackage isn't the only one depending on all the gnome desktop (in case you use Ubuntu GNOME Remix) but ubuntu-desktop or its variant ubuntu-gnome-desktop. What you are looking at is something offered by aptitude and advanced package managers. apt-get is simple, it needs most of things done manually. You can't expect it to do every function of pacman, specially in Ubuntu where there are metapackages created just to install flavors.

What you need is:

aptitude search ~i~sgnome

This looks for packages that are installed from the gnome section. You may want the packages that are dependencies and installed of some installed package:

aptitude search '~R(?and(?name(gnome), ~i))'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.