2

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.

user256518
  • 169
  • 1
  • 8

1 Answers1

2

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))'
Braiam
  • 67,791
  • 32
  • 179
  • 269