10

I installed gnome-core package on Ubuntu (minimal version for the beagle bone) and it was almost 600mb. However, when I try to un-install it using

sudo apt-get autoremove gnome-core 

It removes only 49 MB. Any Ideas, how to remove the entire 600 MB?

0

3 Answers 3

16
+50

gnome-core is a meta package and the case with meta packages is --

They pull packages to get installed but removing them will not remove all the pulled packages.

So, unless, you have copied the names of packages installed by gnome-core, it is virtually impossible to remove all the 600 MBs.

But, you can get the names of pulled packages by the command

apt-cache depends gnome-core 

and try to remove the packages one by one. You should check always whether it is removing any necessary packages.

Or you can get the list of packages in more useful way by this:

apt-cache depends gnome-core | cut -f 2 -d ':'  | tr '\n' ' '

This will list all the dependencies of gnome-core package, ignore the package name in <> marks only.

How do I know, whether any system package is being removed?

When you see a lot of space is being freed from the command, (more that 600MB), you should know that you are removing more than you installed. apt-get will let you know how much space is going to be freed, before removing like with a message like this

After this operation, 384 kB disk space will be freed.

And When you try to remove essential system package, apt-get will show you a warning message.

Recommendation: I suggest you to get a list of packages from the first command, and try to remove them one by one. It is safer. If you see a warning, skip removing that package. I see, most of the packages in gnome-core are related with GUI, I guess removing those packages will not harm your system (if you don't want a GUI).

Hope this helps!


Some note on removing packages

How pulled packages get uninstalled when you remove the master package ?

When you install a package and that package depends on some other packages, the dependency packages also get installed and Marked as auto. That means, the Apt system mark them as Automatically installed as dependency of another package. It helps Apt system to recognize unnecessary packages.

When, you uninstall the master package, the pulled packages are also marked as obsolete or unnecessary packages in the system. You can remove them by providing autoremove option to apt-get. (aptitude automatically remove them with the master package).

An exception to this rule is, if you later install another package which also depends on the pulled packages, the pulled packages will not be marked as obsolete when you remove the first master package.

Example: You installed a package X that depends on package Y. When you installed X, Y also gets installed and marked as auto. If you do not install another package Z which also depends on Y, removing X will render Y's usefulness and Apt system will mark it obsolete and you can remove it with autoremove option.

But If you install a package Z after X which also depends on Y, then removing only X does not mark Y as obsolete package and you can't remove it with autoremove option

But note that if you remove package Y after installing X, it will remove package Y including X, because X can't stay without Y and you wanted you remove Y, that means you also wanted to remove X. Apt will remove X automatically when removing Y unlike marking it obsolete to later removal by autoremove option.

Try out examples: ubuntu-desktop package is a meta package. It was used to install the standard Ubuntu desktop. Try removing it, only that package will be removed.

Also try installing lubuntu-desktop package (You may not want to install this, because it is a big download). But, when you try to remove it, only the tiny package lubuntu-desktop will get removed.

Apt handles meta packages differently

The meta packages like gnome-core, ubuntu-restricted-extras are also called virtual packages. They are called so, because they are basically empty packages, They pull other packages by depending on them. For example, ubuntu-restricted-extras depends on (in 12.04) following packages:

ubuntu-restricted-addons
ttf-mscorefonts-installer
unrar
gstreamer0.10-plugins-bad-multiverse
libavcodec-extra-53

Where, ubuntu-restricted-addons itself is another meta package. Since, meta packages are used for only pulling packages, installing them does not mark the pulled packages as auto, they are marked as manually installed. The result? Removing only the master meta package will not mark the pulled packages obsolete and you can't remove them by autoremove option. That is why you need to remove each pulled package of the meta packages manually.

Example: You installed a meta package X that depends on packages Y and Z. When you installed it, the Y and Z packages aren't marked as auto (automatically installed as dependency of another package), instead they marked as manually installed. In later time when you want to remove X, only the virtual X package gets removed. Both, Y and Z, remain in the system and you can't uninstall them with autoremove option.

7
  • Thats rather cumbersome. But I guess its the only way out right? Jul 18, 2012 at 5:41
  • Are you sure that apt-cache depends will be useful here? I feel the way suggested by tijybba is better suited for the purpose.
    – user25656
    Jul 18, 2012 at 5:43
  • @Sab As far as I know, Yes.
    – Anwar
    Jul 18, 2012 at 5:43
  • @vasa1The issue is I am running a beagle bone and have virtually no gui, even on using vnc viewer Jul 18, 2012 at 5:44
  • @Sab I have added another command to get the list in one line.
    – Anwar
    Jul 18, 2012 at 5:51
2

Installing gnome-core , brings a lot of packages and dependencies ,since it is meta-package .

One of the way is to remove it manually , but you should Know which Packages needs to be removed without causing any after-effects errors.

The list of Packages included are listed here Package: gnome-core (1:3.0+6ubuntu3) [universe]

Go to Synaptic manager (Install it if not present) , click Origin from Left-bottom Selections, refer image

enter image description here

Select the package for removal , by referring to the above link.

Caution if you don't know which packages to remove , then Don't follow this method . These may cause dependency errors.

2

Introduction:

To completely remove programs using the command line, you have the following options;

Remove and config files, but not dependences using apt-get

sudo apt-get --purge remove <Package Name>

Remove unused dependencies and config files using apt-get

sudo apt-get --purge autoremove

When GNOME is installed in Ubuntu 12.04, it installs several packages and libraries it requires as well as some optional packages. Not all these packages and libraries are uninstalled when you uninstall GNOME. Several packages (like epiphany-browser and gnuchess) do not get uninstalled. Quick Uninstall

This is not recommended because it will remove all packages normally installed with GNOME. This may include packages you previously installed (like epiphany-browser or gnuchess) or packages previously installed by other applications.

Note: this uninstall command assumes GNOME was installed on a fresh Ubuntu 12.04.1

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below. (it is very long and a single line)

sudo apt-get purge --auto-remove alacarte bogofilter bogofilter-bdb bogofilter-common browser-plugin-gnash cheese  cheese-common cups-pk-helper dconf-tools desktop-base ekiga epiphany-browser  epiphany-browser-data epiphany-extensions evolution evolution-common  evolution-plugins evolution-webcal fonts-cantarell gdebi gdebi-core gdm  gedit-plugins gimp gimp-data gir1.2-accountsservice-1.0 gir1.2-caribou-1.0  gir1.2-clutter-1.0 gir1.2-cogl-1.0 gir1.2-coglpango-1.0 gir1.2-folks-0.6  gir1.2-gdesktopenums-3.0 gir1.2-gee-1.0 gir1.2-gjsdbus-1.0 gir1.2-gkbd-3.0  gir1.2-gucharmap-2.90 gir1.2-json-1.0 gir1.2-mutter-3.0  gir1.2-networkmanager-1.0 gir1.2-panelapplet-4.0 gir1.2-polkit-1.0  gir1.2-telepathyglib-0.12 gir1.2-telepathylogger-0.2 gir1.2-upowerglib-1.0  gir1.2-xkl-1.0 gjs glchess glines gnash gnash-common gnect gnibbles gnobots2  gnome gnome-applets gnome-applets-data gnome-backgrounds gnome-contacts  gnome-core gnome-dictionary gnome-games gnome-games-extra-data  gnome-icon-theme-extras gnome-icon-theme-full gnome-js-common gnome-panel  gnome-panel-data gnome-session-fallback gnome-shell gnome-shell-common  gnome-themes-standard gnome-video-effects gnotravex gnotski gnuchess  gnuchess-book gtali hamster-applet iagno imagemagick imagemagick-common  indicator-applet-complete inkscape libbabl-0.0-0 libblas3gf libbonobo2-0  libbonobo2-common libbonoboui2-0 libbonoboui2-common libboost-iostreams1.46.1  libboost-program-options1.46.1 libboost-signals1.46.1 libboost-thread1.46.1  libcapi20-3 libcaribou-common libcaribou0 libcdt4 libcheese-gtk21 libcheese3  libclutter-1.0-0 libclutter-1.0-common libclutter-gst-1.0-0 libclutter-gtk-1.0-0  libclutter-imcontext-0.1-0 libcluttergesture-0.0.2-0 libcogl-common  libcogl-pango0 libcogl9 libept1.4.12 libevolution libgc1c2 libgdict-1.0-6  libgdict-common libgegl-0.0-0 libgfortran3 libgimp2.0 libgjs0c libglade2-0  libgnome2-0 libgnomecanvas2-0 libgnomecanvas2-common libgnomeui-0  libgnomeui-common libgnomevfs2-extra libgraph4 libgsl0ldbl libgtkhtml-4.0-0  libgtkhtml-4.0-common libgtkhtml-editor-4.0-0 libgtkmm-2.4-1c2a libgvc5  libilmbase6 liblapack3gf liblqr-1-0 libmagick++4 libmagickcore4  libmagickcore4-extra libmagickwand4 libmozjs185-1.0 libmusicbrainz4-3 libmutter0  libmx-1.0-2 libnetpbm10 libodbc1 libopal3.10.2 libopenexr6 libpanel-applet--0  libpathplan4 libpst4 libpt2.10.2 libseed-gtk3-0 libwmf-bin liferea liferea-data  lightsoff menu menu-xdg mutter-common netpbm notification-daemon odbcinst  odbcinst1debian2 perlmagick python-gmenu python-gnome2 python-lxml python-numpy  python-pyorbit python-uniconvertor quadrapassel sound-juicer swell-foop synaptic  unixodbc

A better way on how to Completely Remove a Package

1) Open the aptitude log file (/var/log/apt/history.log).

2) Locate the files that were installed.

3) Remove the files using 1

sudo apt-get remove --auto-remove <file names>

1Source:How to Completely Uninstall / Remove GNOME

0

You must log in to answer this question.

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