Removing kubuntu-desktop

OK, I just want to get this out there, since I just had this annoying problem. I installed Kubuntu using Synaptic to see if I'd like it any better than the default Gnome desktop. I quickly found out, however, that it didn't want to run nicely on my system – the mouse seemed to lag to hell – and since I can't be arsed with spending hours faffing around trying to get it to work properly I just went back to Ubuntu (I'll probably give it another try when KDE4 is released, with the benefit of knowing how to get rid of it later).

Uninstalling Kubuntu and all of the stuff that it brought in wasn't so straightforward, however. Simply removing the metapackage kubuntu-desktop with Synaptic or aptitude left all of the extra stuff that I didn't want hanging around. This thread gave a massive apt-get line to remove all of the packages, which seemed more than a little suspect to me (enumerating all packages is bound to be a bad idea; some will get missed and some that I could have potentially installed myself previously could be removed), but upon scrolling down I came upon a nice program called debfoster which purged everything nicely. Note: This has been deprecated in favour of using aptitude. I only had to use deborphan because I didn't install kubuntu-desktop with aptitude in the first place. Use aptitude to save yourself a load of hassle. If, like me, you didn't know to use aptitude and just used apt-get or synaptic, deborphan will save your bacon and even keep any KDE packages you've explicitly installed (Kile and KBib for me). Paraphrasing from the thread, these are the commands you need to run:

sudo aptitude install debfoster
sudo debfoster -q
sudo sed -ni '1h;2,$H;${g;s/kubuntu-desktop\n//g;p}' /var/lib/debfoster/keepers
sudo debfoster

(Note that there are four lines here – the "sudo sed" line ends with "keepers".)

Review the output to see if it looks like it's removing all of the unnecessary kubuntu packages, then press P to purge them all and Y to confirm.

Tags: ,

Leave a Reply