49

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.

5

12 Answers 12

45

I rather liked the simplicity of the following remove:

apt-get remove kdelibs-bin kdelibs5-data 

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.

7
  • 1
    Excellent..Applied with some relish to a recalcitrant console installation. +1.
    – J Evans
    Jul 4, 2015 at 18:53
  • 2
    This is a better procedure than the accepted answer in my opinion. It won't touch packages marked as manually installed.
    – berbt
    Mar 9, 2016 at 10:18
  • 4
    I think, that you also should run sudo apt autoremove after that
    – Qback
    Nov 20, 2017 at 16:40
  • 1
    This is the one that worked for me after trying several things to remove KDE stuff from Ubuntu 16.04 and to restore Unity system settings. Much better than accepted answer IMHO. 'apt-get remove unity-control-center apt-get remove kdelibs-bin kdelibs5-data apt autoremove apt-get install unity-control-center reboot' voila!!!!
    – dimuthu
    May 3, 2018 at 12:49
  • 1
    @Zamicol - maybe - I'm happy it worked for 7 years ;-). And - more seriously - I still think the approach is sound - find the one or two foundational packages and remove them to cause an upward cascade. These may have changes name or version number, but I suggest it's well worth working that out. I've defected to openSUSE recently (better hardware support) and no longer have a Debian system for testing, so not something I can provide any more.
    – dsz
    Sep 20, 2022 at 21:45
25

You can use this command (from here) to remove KDE completely:

sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao docbook-xsl dolphin dragonplayer freespacenotifier gnupg-agent gnupg2 gpgsm gstreamer0.10-qapt gtk2-engines-oxygen gwenview ibus-qt4 icoutils jockey-kde k3b k3b-data kaccessible kaddressbook kamera kate kate-data katepart kcalc kde-baseapps-bin kde-baseapps-data kde-config-gtk kde-config-touchpad kde-runtime kde-runtime-data kde-wallpapers-default kde-window-manager kde-workspace kde-workspace-bin kde-workspace-data kde-workspace-kgreet-plugins kde-zeroconf kdebase-runtime kdegames-card-data kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd kdepim-groupware kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepim-wizards kdepimlibs-kio-plugins kdesudo kdm kdoctools kfind khelpcenter4 kinfocenter klipper kmag kmail kmix kmousetool knotes konsole kontact kopete kopete-message-indicator korganizer kpat kppp ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-netbook-default-settings kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager language-selector-kde libakonadi-calendar4 libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadiprotocolinternals1 libassuan0 libattica0 libbluedevil1 libboost-program-options1.46.1 libcalendarsupport4 libcln6 libclucene0ldbl libdebconf-kde0 libdiscid0 libdlrestrictions1 libdmtx0a libencode-locale-perl libepub0 libeventviews4 libfile-listing-perl libflac++6 libfont-afm-perl libgadu3 libgpgme++2 libgps19 libgrantlee-core0 libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libibus-qt1 libilmbase6 libincidenceeditorsng4 libindicate-qt1 libio-socket-ssl-perl libiodbc2 libk3b6 libkabc4 libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 libkcalutils4 libkcddb4 libkcmutils4 libkde3support4 libkdecorations4 libkdecore5 libkdegames5a libkdepim4 libkdepimdbusinterfaces4 libkdesu5 libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 libkexiv2-10 libkexiv2-data libkfile4 libkholidays4 libkhtml5 libkidletime4 libkimap4 libkio5 libkipi-data libkipi8 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5-templates libkonq5abi1 libkontactinterface4 libkopete4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 libkresources4 libkrosscore4 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent3 libkunitconversion4 libkwineffects1abi2 libkworkspace4 libkxmlrpcclient4 liblastfm0 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailcommon4 libmailtools-perl libmailtransport4 libmessagecomposer4 libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmpcdec6 libmsn0.3 libmuonprivate1 libmusicbrainz3-6 libnepomuk4 libnepomukquery4a libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 libntrack0 libokularcore1 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4abi2 libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-3 libprison0 libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqrencode3 libqt4-designer libqt4-help libqt4-qt3support libqt4-scripttools libqt4-sql-sqlite libqt4-test libqtassistantclient4 libqtglib-2.0-0 libqtgstreamer-0.10-0 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libreoffice-kde libreoffice-style-oxygen libsolid4 libsolidcontrol4abi2 libsolidcontrolifaces4abi2 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4abi2 libtemplateparser4 libthreadweaver4 libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl libwww-robotrules-perl libxml2-utils libxss1 libzip1 muon muon-installer muon-notifier muon-updater mysql-client-core-5.1 mysql-server-core-5.1 ntrack-module-libnl-0 odbcinst odbcinst1debian2 okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme oxygen-icon-theme-complete partitionmanager phonon phonon-backend-gstreamer pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-kimpanel-backend-ibus plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text printer-applet python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip qapt-batch qapt-deb-installer quassel quassel-data rekonq shared-desktop-ontologies software-properties-kde soprano-daemon system-config-printer-kde systemsettings update-manager-kde usb-creator-kde userconfig virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common && sudo apt-get install ubuntu-desktop

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.

The first was to modify the Plymouth configuration to remove the "Kubuntu" splash screen (this is just cosmetic, but still annoying and unclean, documented in Ubuntu shows 'Kubuntu' on boot):

sudo update-alternatives --config default.plymouth
sudo update-initramfs -u

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:

greeter-session=unity-greeter
user-session=ubuntu

This last step I cobbled together from KDE overrides lightdm logon screen and How to return the login screen of the original unity ubuntu?.

8
  • 4
    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. Nov 15, 2011 at 22:58
  • 3
    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.) Nov 15, 2011 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.
    – ECII
    Mar 9, 2012 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. Nov 7, 2012 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. Jul 1, 2013 at 17:50
24

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 packages

5
  • 3
    This is the most up to date answer Feb 5, 2021 at 16:43
  • Thanks for helping me remove the buggy KDE apps. May 6, 2021 at 11:02
  • 1
    Thank you so much! Worked great for me after remove UbuntuDDE from my 20.04 LTS install.
    – yanike
    Aug 29, 2021 at 6:28
  • Thanks alot, i installed kde with sudo apt install kde-plasma-desktop it helped me to remove all the stuff now!
    – Aditya
    Sep 14, 2021 at 9:42
  • Thanks, helped a lot!
    – Sai Kumar
    Nov 7, 2021 at 7:31
7

If you are using ubuntu 15.10 or previous version then this command is helpful:

sudo apt-get remove kubuntu

If you are using Ubuntu 16.04 and Plasma 5 then follow the following step

sudo apt purge kubuntu-desktop
sudo apt autoremove
sudo add-apt-repository --remove ppa:kubuntu-ppa/backports
7

It's much easier now.
Install your previous desktop environment (it should be in cache so you dont need to download anything)

sudo apt install ubuntu-desktop

You will still see kubuntu on boot screen. So to remove that

sudo update-initramfs -u

Reboot.
On login screen, choose desktop session other than KDE

And finally remove all traces of kde

sudo apt remove --purge kubuntu-desktop
sudo apt autoremove

If you still see kde login screen (rarely)

sudo dpkg-reconfigure gdm3
sudo apt remove --purge sddm

Replace gdm3 with your current desktop environment's display manager. Common on ubuntu are gdm, lightdm

3

Don't know if this is the right way since I am a beginner, but this worked for me.

sudo apt-get remove kde*
2
  • Welcome to AU. Your answer might be correct for your case but I would not recommend it for general use as this might remove packages that were not meant to be removed. May 8, 2018 at 11:09
  • probably not the right command, see apt-get purge
    – pim
    May 8, 2018 at 11:22
2

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.

1

Try these two one bye one :

sudo apt remove plasma-desktop --autoremove
sudo apt remove kubuntu-desktop --autoremove

If they don't do the trick then this will sure do:

sudo apt-get remove kde* --autoremove
sudo apt-get remove plasma* --autoremove

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.

3
  • It seems your answer got truncated - your last sentence suggests that there is at least one more step but it isn't in there.
    – anonymous2
    May 3, 2021 at 18:10
  • Ohh... Please do not try last step as last step I was going to tell destroyed my os
    – Sharad_740
    May 5, 2021 at 10:36
  • I'm assuming this is a joke? Seriously, was there another step? If not, please remove the final line, since it serves nothing but to confuse
    – anonymous2
    May 5, 2021 at 11:36
0

Check this from Ubuntu forums or in a terminal:

sudo apt-get remove kde-full && sudo apt-get autoremove
  • note (see comment), this may be incomplete, but a good start.
1
  • 3
    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. Jul 13, 2012 at 1:34
0

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.

0

First, check what is going to be removed

sudo dpkg -l | grep .kde.

If you are ok with it, run this command

sudo apt autoremove --purge kde*

Command explanation

# dpkg -l       lists all installed packages
# grep .kde.    filters, so that only packages with keyword kde within their names, listed
# purge         removes mentioned package
# autoremove    tries to remove dependency packages
-3

I used this command (it removes all of KDE and installs unity):

sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok \
amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia \
cdrdao docbook-xsl dolphin dragonplayer freespacenotifier gnupg-agent gnupg2 \
gpgsm gstreamer0.10-qapt gtk2-engines-oxygen gwenview ibus-qt4 icoutils \
jockey-kde k3b k3b-data kaccessible kaddressbook kamera kate kate-data \
katepart kcalc kde-baseapps-bin kde-baseapps-data kde-config-gtk \
kde-config-touchpad kde-runtime kde-runtime-data kde-wallpapers-default \
kde-window-manager kde-workspace kde-workspace-bin kde-workspace-data \
kde-workspace-kgreet-plugins kde-zeroconf kdebase-runtime kdegames-card-data \
kdegraphics-strigi-analyzer kdelibs-bin kdelibs5-data kdelibs5-plugins \
kdemultimedia-kio-plugins kdenetwork-filesharing kdepasswd  kdepim-kresources \
kdepim-runtime kdepim-strigi-plugins kdepimlibs-kio-plugins kdesudo kdm \
kdoctools kfind khelpcenter4 kinfocenter klipper kmag kmail kmix kmousetool \
knotes konsole kontact kopete kopete-message-indicator korganizer kpat kppp \
ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data \
kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs \
kubuntu-firefox-installer kubuntu-netbook-default-settings \
kubuntu-notification-helper kubuntu-web-shortcuts kvkbd kwalletmanager \
language-selector-kde libakonadi-calendar4 libakonadi-contact4 \
libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 \
libakonadiprotocolinternals1 libassuan0  libbluedevil1 \
libboost-program-options1.46.1 libcalendarsupport4 libcln6 libclucene0ldbl \
libdebconf-kde0 libdiscid0 libdlrestrictions1 libdmtx0a libencode-locale-perl \
libepub0 libeventviews4 libfile-listing-perl libflac++6 libfont-afm-perl \
libgadu3 libgpgme++2 libgrantlee-core0 libhtml-form-perl libhtml-format-perl \
libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl \
libhttp-daemon-perl libhttp-date-perl libhttp-message-perl \
libhttp-negotiate-perl libibus-qt1 libilmbase6 libincidenceeditorsng4 \
libindicate-qt1 libio-socket-ssl-perl libiodbc2 libk3b6 libkabc4 \
libkateinterfaces4 libkatepartinterfaces4 libkblog4 libkcal4 libkcalcore4 \
libkcalutils4 libkcddb4 libkcmutils4 libkde3support4 libkdecorations4 \
libkdecore5 libkdegames5a libkdepim4 libkdepimdbusinterfaces4 libkdesu5 \
libkdeui5 libkdewebkit5 libkdgantt2 libkdnssd4 libkemoticons4 libkephal4abi1 \
libkexiv2-10 libkexiv2-data libkfile4 libkholidays4 libkhtml5 libkidletime4 \
libkimap4 libkio5 libkipi-data libkipi8 libkjsapi4 libkjsembed4 libkldap4 \
libkleo4 libkmanagesieve4 libkmbox4 libkmediaplayer4 libkmime4 libknewstuff2-4 \
libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq-common libkonq5-templates \
libkonq5abi1 libkontactinterface4 libkopete4 libkparts4 libkpgp4 \
libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkpty4 \
libkresources4 libkrosscore4 libksba8 libkscreensaver5 libksgrd4 libksieve4 \
libksieveui4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n \
libktorrent3 libkunitconversion4 libkxmlrpcclient4 liblastfm0 \
libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl \
libmailcommon4 libmailtools-perl libmailtransport4 libmessagecomposer4 \
libmessagecore4 libmessagelist4 libmessageviewer4 libmicroblog4 libmpcdec6 \
libmsn0.3 libmuonprivate1 libmusicbrainz3-6 libnepomuk4 libnepomukquery4a \
libnepomukutils4 libnet-http-perl libnet-ssleay-perl libntrack-qt4-1 \
libntrack0 libopenexr6 libotr2 libphonon4 libplasma-geolocation-interface4 \
libplasma3  libplasmagenericshell4 libpolkit-qt-1-1 libpoppler-qt4-3 \
libprison0 libprocesscore4abi1 libprocessui4a libqalculate5 libqapt-runtime \
libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 \
libqrencode3 libqt4-designer libqt4-help libqt4-qt3support libqt4-scripttools \
libqt4-sql-sqlite libqt4-test libqtassistantclient4 libqtglib-2.0-0 \
libqtgstreamer-0.10-0 libqtscript4-core libqtscript4-gui libqtscript4-network \
libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 \
libreoffice-kde libreoffice-style-oxygen libsolid4 libsolidcontrol4abi2 \
libsolidcontrolifaces4abi2 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 \
libsyndication4 libtag-extras1 libtemplateparser4 libthreadweaver4 \
libtimedate-perl liburi-perl libvirtodbc0 libweather-ion6 libwww-perl \
libwww-robotrules-perl libxml2-utils libxss1 muon muon-installer \
muon-notifier muon-updater ntrack-module-libnl-0 odbcinst odbcinst1debian2 \
okular okular-extra-backends oxygen-cursor-theme oxygen-icon-theme \
oxygen-icon-theme-complete partitionmanager phonon phonon-backend-gstreamer \
pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons \
plasma-dataengines-workspace plasma-desktop plasma-netbook \
plasma-scriptengine-javascript plasma-scriptengine-python \
plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel  \
plasma-widget-menubar plasma-widget-message-indicator \
plasma-widget-networkmanagement plasma-widgets-addons plasma-widgets-workspace \
plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text printer-applet \
python-kde4 python-pyudev python-qt4 python-qt4-dbus python-sip qapt-batch \
qapt-deb-installer quassel quassel-data rekonq shared-desktop-ontologies \
software-properties-kde soprano-daemon system-config-printer-kde \
systemsettings update-manager-kde usb-creator-kde userconfig virtuoso-minimal \
virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common \
&& sudo apt-get install ubuntu-desktop
2
  • 5
    Welcome to AskUbuntu! Whilst your answer may in theory answer the question, you may want to add information to explain what the command does.
    – Oyibo
    Oct 6, 2012 at 10:10
  • 6
    -1 for careless copypasta. This list is not necessarily what OP had installed and it may remove manually installed packages. Installing Unity wasn't even asked.
    – berbt
    Mar 9, 2016 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .