4

I am using an Ubuntu 12.04 lts and I don't need the GUI, so I changed the grub to start as text mode, but since I don't use the GUI, I want to delete all about it to save space.

I tried "sudo apt-get remove ubuntu-desktop", but there is still the same GUI as before.

What can I do?

Thanks.

Sergio
  • 41

2 Answers2

4

I think that dependencies are really too tangled to the presence of a desktop for making this thing possible. You can check the remove command in simulation mode, for example:

apt-get -s purge ubuntu-desktop whatever more

...but in my experience you end deleting too much. BTW, trying to remove ubuntu-desktop does nothing because it is just a meta-package; you should remove its dependencies--- you can check them by:

[romano:~] % apt-cache depends ubuntu-desktop
ubuntu-desktop
  Depends: alsa-base
  Depends: alsa-utils
    alsa-utils:i386
  Depends: anacron
 {...awfully lot of lines removed...]

and as you can see the dependents are for example the sound system or anacron, which I do not know if you really want to remove... so the only way is going through that list manually and remove what you want (again, simulate before!).

To have a text-only minimal installation I would either:

  1. install a server version of Ubuntu --- I think it comes without graphic interface by default;

  2. switch to a distribution more tailored to minimal installation and control (like for example Arch Linux).

...but are you sure is worthwhile? Hard disk is cheap nowadays and you'll going to gain at most a couple of GiB...

Rmano
  • 32,167
0

I would remove all the GUI libs, X, pulseaudio

sudo apt-get purge "^libgtk.*" "^libqt.*" xserver-xorg-core "^pulseaudio.*"

Then do an autoremove to remove left over dependencies:

sudo apt-get autoremove --purge

I am using purge to remove config files as well.

Check the list of packages to be removed, sometimes you get unexpected dependencies for CLI tools.

NGRhodes
  • 9,680