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?
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
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:
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 thisAnd 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 toapt-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 packageY
. When you installedX
,Y
also gets installed and marked as auto. If you do not install another packageZ
which also depends onY
, removingX
will renderY
's usefulness and Apt system will mark it obsolete and you can remove it withautoremove
option.But If you install a package
Z
afterX
which also depends onY
, then removing onlyX
does not markY
as obsolete package and you can't remove it withautoremove
optionBut note that if you remove package
Y
after installingX
, it will remove packageY
includingX
, becauseX
can't stay withoutY
and you wanted you removeY
, that means you also wanted to removeX
. Apt will removeX
automatically when removingY
unlike marking it obsolete to later removal byautoremove
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 packagelubuntu-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:
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 packagesY
andZ
. When you installed it, theY
andZ
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 removeX
, only the virtualX
package gets removed. Both,Y
andZ
, remain in the system and you can't uninstall them withautoremove
option.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
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.
Introduction:
To completely remove programs using the command line, you have the following options;
Remove and config files, but not dependences using apt-get
Remove unused dependencies and config files using apt-get
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)
1Source:How to Completely Uninstall / Remove GNOME