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.

2 Answers 2

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...

2
  • Thanks, I will try to delete all the dependencies that I want. This Ubuntu is on a System on Module, so the memory is very small, that is why I want to remove as much as possible.
    – Sergio
    Nov 13, 2014 at 9:43
  • server version of Ubuntu == 800 MB. Thanks lol)
    – Green
    Jun 12, 2017 at 19:36
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.

4
  • 2
    Wrong command usage. Should be sudo apt-get purge "^libgtk.*" .... apt-get accepts a regexp, not a glob. Horror story: askubuntu.com/questions/210976/…
    – Rmano
    Nov 5, 2014 at 11:11
  • Good spot, Stuck in Windows mode. Fixed.
    – NGRhodes
    Nov 5, 2014 at 11:13
  • 2
    Why do you remove the printing system too? And... have you tried it? I checked a simulation with apt-get -s purge (simulation mode) and it will remove way too much (python for example...)
    – Rmano
    Nov 5, 2014 at 11:24
  • Cause its something I remove as I don't use printing... fixed :) According to the sim python stays on my machine.
    – NGRhodes
    Nov 5, 2014 at 11:27

You must log in to answer this question.

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