Posts

Showing posts from October, 2023

Uninstall gnome from Debian / Ubuntu - full apt remove commands

I accidentally installed Debian 12 with GNOME on a "headless" virtual machine with only 10 GB of disk space with a low-cost hosting provider.  I would only ever need to SSH into such a VM. Rather than re-installing again I tried to see if I could remove the GNOME/X11 components.  Various Reddit, Stackexchange and Superuser threads gave some commands but they were far from complete, at least for the newer Debian 11 and 12 versions. Using "sudo apt list --installed" showed what else was remaining after I ran "sudo apt remove gnome". Some of these I looked up online to see if they truly were graphical only. Warning: Do not just run "sudo apt remove gnome*" or "sudo apt remove x11*".  One of these ended up doing a cascade uninstall of sudo itself!  Fortunately I had the root password and could re-install it, but if you don't, I'd try these commands separately.   sudo apt remove totem sudo apt remove xauth sudo apt remov