Skip to content

Solved: How to remove gui of debian, ubuntu, deb and etc. distributions

sudo apt-get remove --purge x11-common

sudo apt-get autoremove

Other options:

Debian uses for installing software for a specific system. The command gives you some information:

tasksel --list-tasks

  • i desktop Graphical desktop environment
  • u web-server Web server
  • u print-server Print server
  • u dns-server DNS server
  • u file-server File server
  • u mail-server Mail server
  • u database-server SQL database
  • u ssh-server SSH server
  • u laptop Laptop
  • u manual manual package selection

The command above lists all tasks known to. The line should print an in front. If that is the case you can have a look at all packages which this task usually installs:

tasksel --task-packages desktop

  • twm
  • eject
  • openoffice.org
  • xserver-xorg-video-all
  • cups-client
  • ...

On my system the command outputs 36 packages. You can uninstall them with the following command:

apt-get purge $(tasksel --task-packages desktop)

This takes the list of packages (output of) and feeds it into the command of. Now tells you what it wants to uninstall from the system. If you confirm it everything will be purged from your system.

Edited by peturbg