prevent aptitude from reinstalling? 

 Date: 16-06-2006
Posted in: uk.comp.os.linux

I'm running Debian Sarge on a very modestly-sized partition. I'd like to remove a few packages I don't care about, but aptitude won't remove a package without also removing its dependents. Thus removing something like kolourpaint will remove kdegraphics will remove kde. Yuk.

To get round this, I've been using dpkg to purge the packages I don't want, but the problem here is that the next time I use aptitude, it detects the "missing" packages and reinstalls them.

Is there a way round this, or do I just have to stick with dpkg if I don't want stuff reappearing?

prevent aptitude from reinstalling? 

> I'd like to remove a few packages I don't care about, but aptitude
> won't remove a package without also removing its dependents.
> Thus removing something like kolourpaint will remove kdegraphics
> will remove kde. Yuk.

kdegraphics is just a meta-package which depends on kolourpaint, among others. Similarly, kde is a meta-package which depends on kdegraphics. aptitude is behaving reasonably here. Moreover, it doesn't remove any 'real' packages apart from the one you specified, i.e., kolourpaint.

Liam

prevent aptitude from reinstalling? 

> Is there a way round this, or do I just have to stick with dpkg
> if I don't want stuff reappearing?

There are two situations that typically give rise to a dependency relationship;

  • A case of actual dependency, where the dependant package will be broken in the absence of the dependency, in which case you really don't want to force the removal.
  • A meta package; most distro provide metapackages that don't actually contain anything useful themselves, but depend on a set of packages that you would often want to install together. In this case there's no point forcing the system to keep the metapackage since it's not actually doing anything anyway.

In this case 'kde' is almost certainly such a metapackage, removing it won't take off the whole of KDE, it will leave all the bits of KDE that you have installed alone, except the individual bit (kolourpaint) that you're wanting to remove.

To be sure you could list the contents of the kde package by doing:

$ dpkg -L kde

and checking that there's nothing beyond the usual barebones docs in the kde package. This shows that it is indeed a metapackage, and you can let aptitude remove it without breaking anything.

Ewan