1

This question already has an answer here:

I've got a VPS server, on which I surprisingly find packages like bluez or thunderbird-gnome-support or firefox or libqt4.

Do I have to list all the packages like in "How to delete all desktop environments except Unity?"?

marked as duplicate by bain, Eric Carvalho, waltinator, chaos, Sylvain Pineau Jun 17 '14 at 9:07

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6

To remove x11 and everything that uses it:

apt-get purge libx11.* libqt.*
  • 2
    Take care with this and review the dependent packages that will be removed carefully because even on server installation, some program may need X11 libraries. I think mainly to image manipulation toolkit like ImageMagick used by many Web Gallery sites. Also, this REGEX will remove not only libx11 related libraries but also libxml libraries that may definetly needed on a server. So for me apt-get purge libx11* would a better proposal. – Benoit Jun 17 '14 at 9:19
4

You can use Tasksel It is a a tool that install/removes packages as per the type of system you require.

https://help.ubuntu.com/community/Tasksel

  • 1
    tasksel -t remove ubuntu-desktop shows that it does not remove Firefox, xorg, etc. – bain Jun 17 '14 at 10:18
  • 1
    Yes you can also do it from the command line with sudo tasksel remove ubuntu-desktop. But if you do dpkg -l libx11-6 or dpkg -l firefox afterwards you will see that those packages are still installed, so tasksel is not removing all of the desktop packages. – bain Jun 17 '14 at 10:37
  • 1
    To get from ubuntu 14.04 desktop to server I ran sudo tasksel then select from the available options Basic Ubuntu Server I unselected the Ubuntu Desktop then tab to ok. It removed all of my std desktop and only installed/left me with a server installation. I have not used the tasksel -t remove before only the terminal gui. I think that you are left with xorg etc.. as removing the ubuntu destop and not selecting the server option does not remove the x-windows system leaving only server cli. x-windows system requires xorg and firefox can be run from the x-windows system. – StallionSA Jun 17 '14 at 10:40
  • I just tested this, selecting Basic Ubuntu Server and deselecting Ubuntu desktop exactly as you described, and it did not remove firefox or the x11 libraries. – bain Jun 17 '14 at 12:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.