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.

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.)

The steps above will remove all of the KDE software, but it won't
necessarily restore your system back to pre-KDE install state. There
are two additional steps that I had to do to restore my system to
pre-installation of kubuntu-desktop.

And the second was to restore the lightdm configruation to use the
unity-greeter instead of kde-plasma-greeter. First run this command
to open the lightdm configuration page - sudo gedit
/etc/lightdm/lightdm.conf and then edit / replace these lines:

I am trying to avoid having to execute such a large command line. I am looking for something along the lines of "sudo apt-get remove kde4ever" and done, simple and it removes anything kde related.
–
Luis Alvarado♦Nov 15 '11 at 22:58

2

You can try running sudo apt-get remove kubuntu-desktop (assuming that's the package you installed to get KDE) followed by sudo apt-get autoremove and that might remove a lot of the stuff you want gone. ...But why do you not want to run such a long command? It's not as though it's more complicated to paste a long command into the Terminal than a short command. (I am not just asking to suggest that you should run that command--if I understand why you do not wish to, then I, or others, may be able to recommend a more appropriate and amenable solution specific to your needs.)
–
Eliah KaganNov 15 '11 at 23:13

1

When I use the above command I prompts it shows me that packages will be removed, some of which I know I need and I use in Unity (like r-base for example). I am afraid that if I execute the above command my system will get messy.
–
ECIIMar 9 '12 at 8:37

1

In my case, copying and pasting into the terminal didn't seem to work (I think something related to buffer size, maybe?). What I've done is to paste it on a text editor, saving it with a .sh extension and then running it.
–
luisgonzalezNov 7 '12 at 17:27

1

@Munim Good point, I should have mentioned that this may remove packages that were installed separately from KDE. I've added a warning to the end of the post, which I hope will help prepare people considering using this technique.
–
Eliah KaganJul 1 '13 at 17:50

Since that's a metapackage, removing it will not be adequate (and, together with sudo apt-get autoremove, will only sometimes be adequate). See this comments under my answer.
–
Eliah KaganJul 13 '12 at 1:34