Linux – How to remove the Ubuntu Gnome desktop after making the switch to KDE

gnomekdekubuntulinuxUbuntu

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?

Best Answer

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.

Related Question