3

I use the Breeze icon theme and want to uninstall the others.

However, when I try, there are loads of other dependencies being removed.

e.g. humanity-icon-theme

sudo apt-get remove humanity-icon-theme
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme-full
The following packages will be REMOVED:
  humanity-icon-theme ubuntu-mono
The following NEW packages will be installed:
  adwaita-icon-theme-full
0 upgraded, 1 newly installed, 2 to remove and 2 not upgraded.
Need to get 8,429 kB of archives.
After this operation, 3,985 kB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
  • Why is mono being removed when I am removing an icon theme?
  • Why is another package being added when I am removing a package?

Is there a hierarchy in these themes and they build on each other or something?

Another example: adwaita-icon-theme

sudo apt-get remove adwaita-icon-theme
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  gnome-icon-theme
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  gnome-icon-theme
The following packages will be REMOVED:
  adwaita-icon-theme firefox gtk2-engines-pixbuf gtk3-engines-breeze humanity-icon-theme kde-config-gtk-style kde-config-gtk-style-preview libgail-common libgail18 libgtk-3-0
  libgtk-3-bin libgtk2.0-0 libgtk2.0-bin libscim8v5 plasma-desktop ubuntu-mono
The following NEW packages will be installed:
  gnome-icon-theme
0 upgraded, 1 newly installed, 16 to remove and 2 not upgraded.
Need to get 9,618 kB of archives.
After this operation, 157 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

This is more extreme and is removing firefox and the whole plasma-desktop!

Why are these other packages depending on specific icon themes?

  • 1
    Possible duplicate of How to trick apt dependencies? – muru Oct 17 '16 at 2:14
  • I'm honestly differing with the opinion that this is a duplicate of the linked question – Anwar Oct 20 '16 at 15:38
3

Your question is a bit broad. But I am answering it anyway.

Case 1: When tried to remove humanity-icon-theme

You have two questions for this case. First one is

  • Why is mono being removed when I am removing an icon theme?

ubuntu-mono is being removed while you were trying to remove humanity-icon-theme because, ubuntu-mono depends on humanity-icon-theme package. The rule is, removing a package upon which other packages depend, will trigger removal of those dependent packages too.

You can see it from apt-cache depends ubuntu-mono command

→ apt-cache depends ubuntu-mono
ubuntu-mono
  Depends: adwaita-icon-theme
  Depends: hicolor-icon-theme
  Depends: humanity-icon-theme

It's clearly seen that ubuntu-mono depends on humanity-icon-theme.

Your second question on this case was

  • Why is another package being added when I am removing a package?

adwaita-icon-theme-full was going to be installed while you were trying to remove humanity-icon-theme.

The theory for apt is: If some important packages depend on a package which is going to be removed, look for some other packages that has same functionality of this soon-to-be-removed package and try to install it.

And that is happening here. You were removing humanity-icon-theme, but some packages needed it. So, what to do? Look for other packages that does the job of humanity-icon-theme. Apt found that it can be adwaita-icon-theme-full, so it selects it for installation.

Case 2: While trying to remove adwaita-icon-theme

You asked why firefox and other packages going to be removed while you were removing only the icon theme. The reason is same. This package somehow, even through a long chain depends on adwaita-icon-theme. So, trying to remove this will trigger removal of those dependent packages.

For example, firefox depends on libgtk-3-0, which depends on libgtk-3-common, which in turn depends on adwaita-icon-theme. So, Though Firefox doesn't directly depend on the icon theme, but it's needed by some dependencies of it. (You can verify this by using apt-cache depends packagename command syntax)

Same answer can be given for question why gnome-icon-theme is being installed here.

Hope that helps.


OP asked in comment

I don't understand why the packages would depend on a specific theme though. Isn't the point of themes that they can be changed?

Yes, depending on a specific theme is bad. But also a graphical desktop environment needs some sort of icon right? If no icon is needed for a DE, how would it render icons and themes component? That's why every DE specifies a default/fallback icon themes for it. For GNOME, it is adwaita-icon-theme. So, if you remove it, GNOME applications might give you a good bye too! In my system, when I issued command to remove it, it tried to remove 346 packages.

But other than these defaults, you can add and remove any other theme packages.

| improve this answer | |
  • Thanks for the detailed answer. I don't understand why the packages would depend on a specific theme though. Isn't the point of themes that they can be changed? – opticyclic Oct 20 '16 at 15:41
  • 1
    @opticyclic The package doesn't depend on a specific theme, but themes like adwaita-icon-theme are at the core of GNOME desktop environment. And firefox and others depending on it will be removed when you want to remove it. This is not true for other icons themes though. You can add and remove any other themes. adwaita-icon-theme and gnome-icon-themes are special – Anwar Oct 20 '16 at 15:47
  • @opticyclic added more details on the answer. – Anwar Oct 20 '16 at 15:57

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.