How to remove the Ubuntu Gnome desktop after making the switch to KDE?

Posted on

Problem :

This is the opposite of this question. Basically I’ve been using Ubuntu for a while but decided to give KDE a shot so I went through the process of getting the latest KDE installed. I’m very impressed with KDE and the Kwin window manager seems like a better WM than Compiz which is what I was using for Gnome (sure that’s an oppinion).

This was an Ubuntu Jaunty install. So how do I go about removing the Gnome desktop? Is there an automated way similar to what my previous question covered?

UPDATE: Should there be any packages I should NOT remove in the process?

Solution :

The purge command is a good start. In addition, you probably want to remove all the dependent libraries that were installed only to get Gnome. You can do that via autoremove in apt-get or, if you use aptitude, it should happen automatically.

Note that the purge command has an oddity: it purges items you remove explicitly, but only removes any automatically removed dependent packages. (That is, if you enter aptitude purge foo-bar and fizzbuzz gets automatically removed at the same time, foo-bar is purged but fizzbuzz is only removed.) So a good way to recursively purge is this:

aptitude purge foo-bar && aptitude purge ~c

The ~c search in aptitude finds any packages that were removed but not purged in the first removal.

One final note, if you haven’t been using aptitude, always check its output the first time you try to run it. Don’t simply say “Yes” to whatever it wants to do. Depending on what package manager you’ve been using, you may find that aptitude thinks some things should be autoremoved, but you prefer to keep them.

Ubuntu has a built-in tool for changing the type of system you are running.

$ sudo tasksel

This tool lets you check the box next to the type of system you want (Kubuntu, Xubuntu, Ubuntu, Ubuntu Server) and then confirm to have the tool re-configure your system, removing and adding packages as needed.

I think the simplest way to do this is to remove ubuntu-desktop and install kubuntu-desktop.

sudo apt-get install kubuntu-desktop
sudo apt-get --purge remove ubuntu-desktop

You can also just uninstall gnome-desktop-environment instead of ubuntu-desktop.

Well, you cant totally remove Gnome because, many common programs on Ubuntu (read Firefox) use Gnome Libraries.

Leave a Reply

Your email address will not be published. Required fields are marked *