2

I have no need for the help utility, document viewer, contacts app, etc. that Gnome has built into the gnome-shell.

Is is possible to remove just those packages? Every time I try it wants me to remove gnome3 all together.

I feel like this should be possible and that I am missing something.

3 Answers 3

3

Uninstalling packages pulled by a meta-package is always hard, if not impossible. However, Since you're desperately willing to remove those, even using manual guessing, I can suggest a good alternative.

The packages installed, upgraded or removed are logged in /var/log/apt/history.log file. It is relatively easier to just copy the package names from relevant section and manually uninstall them.

Here is a sample of a section from the file

Start-Date: 2016-12-12  19:15:40
Commandline: aptdaemon role='role-commit-packages' sender=':1.293'
Install: libva-tpi1:amd64 (1.7.1-2~gd~x), intel-gpu-tools:amd64 (1.15-1intel1), libva-egl1:amd64 (1.7.1-2~gd~x), vainfo:amd64 (1.7.1-2~gd~x), libva-glx1:amd64 (1.7.1-2~gd~x)
Upgrade: libgles2-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm-nouveau2:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-nouveau2:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libegl1-mesa-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgles1-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libglapi-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libglapi-mesa:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), mesa-common-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libxatracker2:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libegl1-mesa-drivers:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libegl1-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgbm1:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm-amdgpu1:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-amdgpu1:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libwayland-egl1-mesa:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgles2-mesa-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm2:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm2:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libgl1-mesa-dev:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-dri:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-dri:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libosmesa6:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libosmesa6:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-glx:amd64 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libgl1-mesa-glx:i386 (13.1~git1611130730.151aec~gd~x, 13.1~git1612120730.609216~gd~x), libdrm-intel1:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-intel1:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-radeon1:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-radeon1:i386 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x), libdrm-dev:amd64 (2.4.73+git1611221830.1924b6~gd~x, 2.4.74+git1612060630.082579~gd~x)
End-Date: 2016-12-12  19:16:59

You can find the required package name from Install: field's value. Maybe even employ some textual parsing to pull the package names from it.

Hope this helps a bit at least.

Update

I've written a Ruby script to help see the packages get installed with a command, so that those can be removed later. But caution should be practiced because your later installed some package might also be dependent on some of them. It still isn't finished and I want to expand it. Anyway, check it here https://github.com/AnwarShah/apt-remove-meta

  1. Download the zip file or clone the repo
  2. cd to the directory and
  3. Run ruby search-apt-log.rb. It will ask for a search term, give it. Then it will give you a history of all apt event involving that term. You can then see which packages get installed and remove them by copying the names.
1

I saw that the installation size/space to be freed for those packages when calling up apt-get was a few MBs so I bit the bullet and let apt-get do its thing, and everything was OK.

So if anyone else is not so sure about going through with package removal, just make sure the install/uninstall size is right for the package and everything should be just fine. If it shows up as a few hundred MBs, then don't hit Y

0

Some time ago I wrote an sh script I called apt-holepunch that accomplishes this (http://www.mail-archive.com/[email protected]/msg900702/apt-holepunch). Warning: this script is extremely dangerous.

Full context here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625801

It turns out that, yes there are good reasons for not wanting to install all packages from a metapackage but leaving the metapackage installed so that future ones added get installed. Somehow the dev team doesn't grasp this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .