How to remove all GUI related packages in Debian

For some time now I am using my gk802 device as headless server running Debian Jessie. Finally I have decided to remove all GUI related packages from the system.

After searching the net I found out that this can be accomplished with:

apt-get --purge remove x11-*
apt-get autoremove

This is not the prettiest solution, since others mention using tasksel to purge desktop packages with

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

but my tasksel –list-tasks showed that none of the tasks were installed.

And of course if you want to purge old config files that are still remaining on the system you can use:

dpkg -l | grep ^rc | cut -d' ' -f3|xargs dpkg -P

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.