Skip to content

Remove GUI from Raspbian

If your Raspbian image came pre-installled with and GUI components you may want to remove them to free up some space on your partition. It's quite easy to do and highlights some useful commands:

Test the process with --dry-run (no changes are actually made to the system):

apt-get remove --dry-run --purge libx11-.*

List desktop related packages:

dpkg -l | grep -i lxde

Remove all related packages and their config files:

sudo apt-get remove --purge libx11-.*

Remove no longer needed dependencies:

sudo apt-get autoremove --purge

Clean the apt cache:

sudo apt-get autoclean

After doing the above I recovered about 2.3 gigabytes of disk space.

Further reading


No Trackbacks


Display comments as Linear | Threaded

Sylvester on :


Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options