23 05 | 2011

Uninstalling a single component of a meta-package

Written by Tanguy

Classified in : Homepage, Debian, Command line, To remember

Or how to get rid of Evolution without removing your whole system

Tree from a GNOME package to Evolution, GIMP and Brasero packages

There is a complain I have heard several times from people after they installed Debian: “I use Icedove/Thunderbird so I do not need Evolution: I tried to remove it but this would remove my whole system, that sucks!”

Explanation

The reason behind this situation is that GNOME is installed by a meta-package, which is a dummy package that depends on each component of the official GNOME desktop, including Evolution. So it got installed as a dependency of that dummy package. This means that you, or rather, the Debian installer, never asked explicitly to install either Evolution or any other specific software: it came automatically.

Now, you want to remove Evolution: very well, but this implies removing the meta-package, as you are removing one of its dependencies. But if you are removing this meta-package, there is no reason to keep all this software you did not asked for, so, as they got installed automatically, they are now removed automatically as well…

The solution

So, do you still want to remove Evolution but keep the remaining of your GNOME desktop? Of course you will not keep « GNOME », because GNOME includes Evolution, so strictly speaking GNOME without Evolution is not GNOME any more.

Well, there is a solution: marking all the dependencies of the meta-package as manually installed, that is, faking that you installed them explicitly Aptitude is able to do that with its powerful search functions:

# aptitude unmarkauto '?reverse-depends(gnome) | ?reverse-recommends(gnome)'
# aptitude unmarkauto '?reverse-depends(gnome-core) | ?reverse-recommends(gnome-core)'
# aptitude unmarkauto '?reverse-depends(gnome-desktop-environment)'\
' | ?reverse-recommends(gnome-desktop-environment)'

What did we do? Well, exactly what is written: unmarking as automatically installed the packages that reverse-depend or reverse-recommend gnome or gnome-desktop-environment. In other words, those that are dependencies or recommendations of gnome, gnome-core or gnome-desktop-environment. Why these three packages? Because the GNOME environment that Debian provides by default is composed of several meta-packages: I shall let you refer to their respective descriptions for further information.

Now, you can safely remove Evolution without pulling out your whole desktop system:

# aptitude remove evolution

26 comments

monday 23 may 2011 à 23:48 Commenter said : #1

Problem: updates. (And BTW, due to some conspiracy evolution is currently a dependency of gnome-core)

monday 23 may 2011 à 23:54 Elessar said : #2

@Commenter: Thank you for this precision, as I do not use GNOME I did not notice that detail. I have corrected my text. But I do not understand, what would be a problem with the updates?

tuesday 24 may 2011 à 00:21 Timo Juhani Lindfors said : #3

Updates might add new dependencies for gnome? So you'd need to run that aptitude command after each upgrade?

tuesday 24 may 2011 à 00:24 Tanguy aka Elessar said : #4

@Timo Juhani Lindfors: Well, you cannot have your cake and eat it. If you choose not to keep GNOME, which includes Evolution, then you do not have GNOME, and will not get the software they add to it in new releases.

Now, running this command again will do nothing. What you may want to try is to run « apt-get install gnome » and cancel it, just to see what it would install: that would indicate you what you are missing from a full GNOME environment.

tuesday 24 may 2011 à 08:22 Anonymous said : #5

Wouldn't it be way better if meta packages only recommended their dependencies? That way by installing gnome then uninstalling evolution you'd have "gnome without evolution", and you'd still have the benefits of the meta package - e.g. new dependencies of the meta package would still get installed, the meta package still keeps your desktop.

tuesday 24 may 2011 à 08:24 Anonymous said : #6

Also, most graphical tools don't expose that functionality - which means the users that most likely fall into that trap cannot fix this.

tuesday 24 may 2011 à 10:20 DevMusings said : #7

Quite natural if you know aptitude but I had not though of it. Thanks for having shared this tip.

tuesday 24 may 2011 à 11:12 Jon said : #8

I think this is the best solution I've seen to the problem, so far. But indeed, a better solution might be a very-user-friendly way of creating an alternative meta-package, so that you did not loose the information that the dependencies were auto-installed, and could remove the whole lot at a later date if you chose to.

tuesday 24 may 2011 à 12:24 Tanguy said : #9

@Jon: Well, if you want to remove the whole meta-package dependencies, even if they are marked as manually installed, this is just as easy, simply replace unmarkauto by remove… :-)

tuesday 24 may 2011 à 13:36 oscar said : #10

Or you could use equivs to generate a placeholder package for evolution. Survives upgrades too, if you choose a high version number.

thursday 09 june 2011 à 15:08 merwok said : #11

I do this for Xfce, only using the graphical (curses) interface. I like to see what my changes will be and confirm, which is not possible with the command line you gave. It’s nearly as fast, since I can mark xfce4 for removal with one keystroke and then select all dependencies for install (which effectively means they will be marked as manually installed) with another keystroke.

friday 10 june 2011 à 15:17 Matteo said : #12

@merwok: just use aptitude in interactive mode, select the gnome package, expand its dependencies with "]", then press "m" over the group to reset the "auto" mark on all of them. Do it again for gnome-core etc. as you please.

tuesday 16 august 2011 à 13:56 Aragon said : #13

@MAtteo: Is there any tutorial or wiki for the method you mention. I am finding it difficult; rather i am afraid to mess-up things.

@Tanguy: If i use the commands you say and remove evolution. And then again use the commands, replacing the unmarkauto to remove. Will everything will be back as it was; like if i then try to remove gnome-games will it ask to remove gnome as additional dependency?

tuesday 16 august 2011 à 15:28 Tanguy said : #14

@Aragon :
My command asks aptitude to mark every single component of GNOME as manually installed. Thus, if you run it with remove instead of unmarkauto, you are explicitly asking to remove every single component of GNOME. I do not think this is what you want to do, is it?

When you remove gnome-games, is does not ask you to remove gnome as a dependency, but it does remove gnome because gnome depends on gnome-games.

sunday 04 september 2011 à 22:54 ubuntufreak said : #15

Won't work for me... aptitude remove evolution still wants to uninstall gnome, gnome-core and gnome-desktop-environment

sunday 04 september 2011 à 23:16 Tanguy said : #16

@ubuntufreak: I think Ubuntu uses another meta-package for its GNOME-based environment. Run `aptitude why evolution` to find out what installed meta-package depends on it.

tuesday 06 september 2011 à 21:50 ubuntufreak said : #17

Hi, my nickname may be confusing, but I'm running Debian :P So the problem is the same :)
aptitude why evolution gives:
i gnome-core Dépend evolution (>= 2.30)

wednesday 07 september 2011 à 10:17 Tanguy said : #18

@ubuntufreak : Okay, I see. It is normal that uninstalling evolution removes gnome-* too, as these are packages that depend on evolution: this implies that they cannot be installed if evolution is not. However, by marking gnome-*'s dependencies and recommendations as manually installed, removing evolution should: 1. still remove gnome-* but 2. not remove gnome-*'s dependencies, this time.

saturday 25 february 2012 à 04:48 shirish said : #19

Hi,
I'm running Debian sid/unstable. I know I shouldn't run commands that I don't understand still I did and this is what happened :-

$ sudo aptitude unmarkauto '?reverse-depends(gnome) | ?reverse-recommends(gnome)'
[sudo] password for shirish:
"python2.5-pyorbit" exists in the package database, but it is not a
real package and no package provides it.
"ocaml-base-nox-3.11.2" exists in the package database, but it is not a
real package and no package provides it.
Note: selecting "ocaml-base-nox" instead of the
virtual package "ocaml-base-nox-3.12.1"
"liblablgtk2-ocaml-h3pg1" exists in the package database, but it is not a
real package and no package provides it.
Note: selecting "liblablgtk2-ocaml" instead of the
virtual package "liblablgtk2-ocaml-yfv67"
"libghc6-haskell98-dev-1.0.1.1-0fdaf" exists in the package database, but it is not a
real package and no package provides it.
"python2.6-gtk2" exists in the package database, but it is not a
real package and no package provides it.
"libghc6-base-dev-4.2.0.0-2cc27" exists in the package database, but it is not a
real package and no package provides it.
Note: selecting "liblablgtk2-gnome-ocaml" instead of the
virtual package "liblablgtk2-gnome-ocaml-aow60"
"perlapi-5.10.0" exists in the package database, but it is not a
real package and no package provides it.
"ada-compiler" is a virtual package provided by:
gnat-4.6 gnat-4.4
You must choose one to install.
"libghc6-containers-dev-0.3.0.0-4a332" exists in the package database, but it is not a
real package and no package provides it.
"python2.5-gobject" exists in the package database, but it is not a
real package and no package provides it.
"libghc6-glib-dev-0.11.0-ca645" exists in the package database, but it is not a
real package and no package provides it.
"ocaml-nox-3.11.2" exists in the package database, but it is not a
real package and no package provides it.
Note: selecting "ocaml-nox" instead of the
virtual package "ocaml-nox-3.12.1"
"libghc6-array-dev-0.3.0.0-ed0c6" exists in the package database, but it is not a
real package and no package provides it.
"libghc6-gtk-dev-0.11.0-05911" exists in the package database, but it is not a
real package and no package provides it.
"python2.5-gtk2" exists in the package database, but it is not a
real package and no package provides it.
"liblablgtk2-ocaml-dev-h3pg1" exists in the package database, but it is not a
real package and no package provides it.
"liblablgtk2-gnome-ocaml-4ol02" exists in the package database, but it is not a
real package and no package provides it.
Note: selecting "liblablgtk2-ocaml-dev" instead of the
virtual package "liblablgtk2-ocaml-dev-yfv67"
"libghc6-mtl-dev-1.1.0.2-23ca4" exists in the package database, but it is not a
real package and no package provides it.
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Should it be giving output like this ?

saturday 25 february 2012 à 04:51 shirish said : #20

An update, it seems now evolution brings in evolution-exchange and evolution-plugins and both seem to be circular dependencies as trying either of them gives something like this :-

$ sudo aptitude remove evolution-plugins
The following packages will be REMOVED:
evolution-plugins
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 1,158 kB will be freed.
The following packages have unmet dependencies:
gnome: Depends: evolution-plugins (>= 3.0) but it is not going to be installed.
The following actions will resolve these dependencies:

Remove the following packages:
1) gnome
2) gnome-desktop-environment

Leave the following dependencies unresolved:
3) evolution recommends evolution-plugins
4) task-gnome-desktop recommends gnome


Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.

$ sudo aptitude remove evolution
The following packages will be REMOVED:
evolution
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 5,167 kB will be freed.
The following packages have unmet dependencies:
evolution-plugins: Depends: evolution (= 3.2.2-1) but it is not going to be installed.
evolution-exchange: Depends: evolution (>= 3.2) but it is not going to be installed.
Depends: evolution (< 3.3) but it is not going to be installed.
gnome: Depends: evolution (>= 3.0) but it is not going to be installed.
open: 32; closed: 301; defer: 8; conflict: 26 .The following actions will resolve these dependencies:

Remove the following packages:
1) evolution-exchange
2) evolution-plugins
3) gnome
4) gnome-desktop-environment

Leave the following dependencies unresolved:
5) evolution-common recommends evolution
6) libreoffice-evolution recommends evolution
7) task-gnome-desktop recommends gnome


Accept this solution? [Y/n/q/?] q
Abandoning all efforts to resolve these dependencies.
Abort.

thursday 01 march 2012 à 03:55 mandyke said : #21

@shirish
> An update, it seems now evolution brings in evolution-exchange and
> evolution-plugins and both seem to be circular dependencies as trying
> either of them gives something like this :-

The relevant dependencies:

- gnome depends on evolution-exchange, evolution-plugins
-- evolution-exchange depends on evolution, libevolution
--- evolution depends on libevolution
-- evolution-plugins depends on libevolution

Note that these are not circular; the depended on packages never
themselves depend on a package higher up in the tree.

For a circular dependency you would have to see something like
libevolution depending on evolution, which would be quite bogus :-)

As mentioned by Tanguy a few comments back, it is expected that removing something like evolution or evolution-plugins is going to break the gnome meta-package and cause it to be removed also. However, after doing the unmarkauto commands from the post you will not see the other packages from gnome being removed also.

saturday 28 april 2012 à 13:31 silicium said : #22

Thanks for the unmarkauto explanation.
Then how to reinstall or rebuild GNOME things free from useless components with deeper dependencies, like avahi that I won't use on my network? I tried to force remove it with dpkg but the desktop menus were gone after reboot, had to reinstall with synaptic fixing so-called broken packages. In the end, I did not feel much more free than on Windows.

monday 01 october 2012 à 20:43 nuoritoveri said : #23

Thanks! I adapted your explanation to remove mate-keyring :) It's a much grater... pain than evolution. Evolution just lingers somewhere and keyring... stalks.

thursday 25 october 2012 à 09:30 Doom said : #24

Nowadays what I do when installing Debian is that I start from nothing (the "server mode" with no graphical environment) and then I only install what I strictly need :)

thursday 24 october 2013 à 17:11 CodeLurker said : #25

I've got Wheezy, and followed the instructions; but it stall wanted to uninstall Gnome. I also tried the aptitude GUI method as suggested; but I get the same thing.

What burns me, is RhythmBox sends metadate on EVERYTHING I'm playing to Last.fm. Ubuntu pulls the same crap with Amarok - which reports everything I play. VLC player reports everything I play to MusicBrains.com. My conclusion: freeware is probably being invaded by "helpers" that are paid to subvert our privacy.

sunday 18 september 2016 à 01:57 DebianUser said : #26

Thank you Tanguy, for this interesting discussion on meta-packages. I think meta-packages is how distros preserve their identity, so we can't avoid breaking them without consequences. I've decided to keep Evolution and Gnome-Games -- begrudgingly. Also, in Debian I'm seeing that some of the Gnome *components* also attach Evolution as a dependency -- so now it's more complicated than unmarking meta-packages.

My problem with Evolution is that it does not seem to work well with IMAP for MY Gmail account (it never succeeds in signing in, so it's useless unless I use it as a POP client which downloads messages to my hard drive (who wants that any more?!)

For those having similar issues with Evolution for their Gmail account, I did find a possible solution in a package called gnome-gmail which integrates your Gmail account with the Gnome Desktop. It worked for me when I ran Ubuntu Unity (until recently) and appears to be working in Debian Gnome (Jessie.) My attempt to install a manually downloaded package failed, but adding the dev's PPA allowed it to appear in Debian Packages (Ubuntu Software Center) and it installed successfully. Below is the gnome-gmail dev site. Good luck to all.

https://davesteele.github.io/gnome-gmail/

Write a comment

What is the fourth letter of the word fluia? : 

Archives