I wanted to switch to Xfce (I had KDE and GNOME installed), and I did this :
sudo apt-get install xubuntu-desktop
sudo apt-get remove kubuntu-desktop
sudo apt-get remove ubuntu-desktop
sudo apt-get autoremove
but to my surprise, I could still pick gnome, kde plasma, etc during the log in.
So, how do I completely remove KDE and GNOME desktops?
As per the suggestion in this site, you can get pure xubuntu-desktop:
From Ubuntu Quantal:
From Kubuntu Quantal:
From Lubuntu Quantal:
It suggests to do
sudo apt-get install xubuntu-desktop
which you have already done. How to convert Ubuntu to Xubuntu talks about the changes you will get so you must edit the command and see what you may need.Background
The k/x/ubuntu-desktop packages are metapackages /1/.
"These packages do not contain actual software, they simply depend on other packages to be installed. This setup allows entire sets of software to be installed by selecting only the appropriate metapackage."
The Kubuntu desktop /2/ package is depending/recommending /4/ lot of packages. Some of them could be common with other desktops.
How did you install the desktops ?
The Synaptic and the Muon package managers are keeping history logs or parsing the dpkg log.
Checking installed/updated/removed packages from the dpkg log (command line):
Recent status log:
A bit older dpkg log:
The oldest logs - rotated dpkg logs (packed): dpkg.log.2.gz, dpkg.log.3.gz...
You could look the log files and search what the xubuntu-desktop, kubuntu-desktop, etc did install.
When testing/experimenting
Keeping own logs. There is the logsave command
example:
With the testing_kubuntu-desktop.log it is a bit easier to remove/purge the unwanted packages.
Links:
https://wiki.ubuntu.com/JauntyJackalope/ReleaseNotes
Recommended packages installed by default
In accordance with the Debian Policy Manual (which says "The 'Recommends' field should list packages that would be found together with this one in all but unusual installations"), the package management system now installs packages listed in the Recommends: field of other installed packages as well as Depends: by default. If you want to avoid this for specific packages, use apt-get --no-install-recommends; if you want to make this permanent, set APT::Install-Recommends "false"; in /etc/apt/apt.conf. Be aware that this may result in missing features in some programs.
(This change was made in Ubuntu 8.10.)
I decided after installing Lubuntu Desktop in 12.04 LTS that I was not going to use it and made plans to remove it. I got errors when following some of the instructions above. (I apologies, but I never kept the screen shots).
As the Lubuntu desktop was now broken, I used the Synaptic Package Manager, firstly to restore it (a redundant step really) and then to remove it completely.
The method was simple and the result was perfect, removing everything.
This command will help you to remove the given desktop:
To remove KDE entirely, try this: