I have 2 computers with Ubuntu but on both I installed KDE to have another option for the users. Since Unity has come along very well, there has not been a need to use KDE for a while now. How can I delete all KDE related packages with one single sweep, freeing space and anything KDE related in Ubuntu, including overwriting the Logo of ubuntu when the PCs start or shutdown since after installing KDE the Kubuntu logo is the default one. How to revert back completely from all KDE stuff with a simple short command line or GUI tool.
NOTE - I ask this because it is very time consuming to start selecting, one by one, each package that relates to the KDE desktop environment, checking if it also relates to any GTK, checking dependencies for each, etc.. Deleting the package kubuntu-desktop does not remove every installed KDE package that was installed with it since this is a pseudo package that installs the rest of the real packages but does not uninstall them which makes me wonder why a package can install a whole bunch of other packages but not uninstall them with some added option to actually uninstall them not just the dummy package itself.
I rather liked the simplicity of the following remove:
Credit to
craigevil
on the Debian Forums. (http://forums.debian.net/viewtopic.php?f=10&t=102884)The thing here is that, by focusing on the two packages on which virtually all of KDE is built, the rest of KDE gets uninstalled too, as they depend on the above.
You can use this command (from here) to remove KDE completely:
However, if you have manually installed KDE-specific programs since installing KDE, then you'll have to remove those programs separately and then run
sudo apt-get autoremove
.Warning: As Munim says, this will remove a lot of packages, and may remove packages that were installed before KDE (or after KDE but separately from it) as well as packages that were installed as part of KDE. This may occasionally produce unpredictable results, such as package configuration problems.
syserss has written an explanation of some of the further action you may need to take to make your system work the way you wish after removing these packages.
(I've quoted it below, but changed the citation format to embedded links, for readability.)
This post is probably too late. However, as nothing else was working for me (I was using KDE5), I tried the following and it did the trick:
sudo apt remove libkf5*
(bash)sudo apt remove 'libkf5*'
(zsh)Then, use
sudo apt autoremove
to remove all the unused packagesIf you are using ubuntu 15.10 or previous version then this command is helpful:
If you are using Ubuntu 16.04 and Plasma 5 then follow the following step
It's much easier now.
Install your previous desktop environment (it should be in cache so you dont need to download anything)
You will still see kubuntu on boot screen. So to remove that
Reboot.
On login screen, choose desktop session other than KDE
And finally remove all traces of kde
If you still see kde login screen (rarely)
Replace gdm3 with your current desktop environment's display manager. Common on ubuntu are gdm, lightdm
Don't know if this is the right way since I am a beginner, but this worked for me.
This is what worked for me:
sudo apt-get purge kde* plasma* libkf*
Parse the list and make sure that all the packages that are going to be deleted are KDE-related.
Of course abort if it is going to delete core components like xorg or linux.
Check this from Ubuntu forums or in a terminal:
Try these two one bye one :
If they don't do the trick then this will sure do:
In my case it removed annoying k-apps lefovers. I uninstalled because all I was getting is black screen with cursor. Ubuntu was working just fine.
I've already run "apt remove kde-desktop", but some programs still hang around. After a while, I (happily) accidentally removed the right program for all other kde things (like spectacle, which troubled me for some time because I can't remove it through snap or apt):
apt remove kded5
It's the KDE daemon. After removing it, "apt autoremove" actually wiped out all traces of KDE on my machine.
Edit: No it does not remove everything. While searching for imagemagick, I stumbled across "imagetops", which is one component of the KDE project, but without KDE in its name, apparently.