Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed kubuntu-desktop just to experiment with its interface. Then I decided to remove and did the traditional apt-get purge and autoremove but it seems elements of kubuntu are still there. For example interface elements, scrollbars, bootscreen etc are still there.

Is there any method I can completely remove without installing a fresh copy of ubuntu?

share|improve this question
Possible duplicate of How to remove desktop environments? – bain Jan 19 at 23:49

I would recommend you to use aptitude to do this operation, this will search the packages that would remove the KDE environment and leave Ubuntu's default:

sudo apt-get install aptitude
aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-desktop+

This will search for any package that kubuntu-desktop depends to, but doesn't depends of ubuntu-desktop. Also, this method is a bit greedy. It will remove Qt packages, ergo mplayer2, VLC and any package that depends on Qt libraries may be deleted. Add those packages with a plus sign (+) at the end, like ubuntu-desktop package in this case. For other flavors:


aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(xubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' xubuntu-desktop+


aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(lubuntu-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' lubuntu-desktop+


aptitude search '?and(?and(?and(?reverse-depends(kubuntu),?not(?reverse-depends(ubuntu-gnome-desktop))),?automatic), ?not(?or(?priority(required), ?priority(important))))' ubuntu-gnome-desktop+

As you can see, only replace the last packages name with the name of your preferred to leave. If you used kde-core or other metapackages you should replace "kubuntu" with the name of the metapackage.

Making sense of aptitude search

To explain exactly which package are selected, lets explain the search command more deeply:

        ?and(                          // we're searching for packages that are
            ?reverse-depends(kubuntu), // reverse dependencies of kubuntu
            ?not(?reverse-depends(ubuntu-desktop)) // and not of ubuntu-desktop
            ),     // that fulfills the condition above 
        ?automatic // and is automatically installed
     ?not(                        // and also that are not
         ?or(                     // either required nor important
share|improve this answer
I am doubting the validity of this method. I tried removing kubuntu as suggested. It tried to remove the following packages which are definitely not just used by kubuntu: evolution, cryptsetup, lsb, skype, software-center, ubuntu-desktop, wine, and the list goes on..... Needless to say I did not continue the uninstallation. – Jacques MALAPRADE Jan 7 '15 at 11:53
@JacquesMALAPRADE is impossible that it tries to remove ubuntu-desktop because ?not(?reverse-depends(?exact-name(ubuntu-desktop)))). So, you obviously did something wrong. – Braiam Jan 7 '15 at 16:05
It asked to try harder again and then came up with the following which clearly states that ubuntu-desktop will be removed. . along with skype, evolution etc.... – Jacques MALAPRADE Jan 12 '15 at 9:14
The commands you proposed for Ubuntu removed from my system python, fonts, the file manager, and a lot more... eventually nothing worked on my system and I had to reinstall the OS... – Pantelis Sopasakis Mar 8 '15 at 13:45
It ruined my system too. Now i have some unmet dependencies, if install vlc or qBitorrent. – Err Hunter Sep 7 '15 at 12:16

in 14.04 LTS 64Bit

sudo apt-get remove libkde3support4 k3b-data ntrack-module-libnl-0 libkrosscore4 libgpgme++2 libqapt2 oxygen-icon-theme libktexteditor4 libtaskmanager4abi5 kdenetwork-filesharing libkblog4 libchm1 plasma-widgets-addons libkimap4 plasma-netbook libkdeui5 libkdeclarative5 ttf-oxygen-font-family gtk3-engines-oxygen user-manager gpgsm libakonadi-kcal4 kdepim-kresources libruby1.9.1 plymouth-theme-kubuntu-logo libqt4-sql-mysql libmailtransport4 kde-telepathy-filetransfer-handler kde-zeroconf libkpimtextedit4 konsole liblastfm1 libqjson0 libtag-extras1 libkdecorations4abi1 libkdcraw23 libkpeople3 kdepimlibs-kio-plugins libqrencode3 libkparts4 libakonadiprotocolinternals1 libbalooxapian4 akonadi-server nepomuk-core-data libqca2 kubuntu-notification-helper kdemultimedia-kio-plugins libntrack0 kde-runtime-data cdparanoia libplasma-geolocation-interface4 quassel-data libkemoticons4 libmessagecomposer4 libweather-ion6 cdrdao libnepomukquery4a bluedevil libakonadi-notes4 libkmediaplayer4 libksieveui4 muon-discover libmicroblog4 libnetworkmanagerqt1 libqt4-qt3support libkcddb4 amarok-utils libmailcommon4 libktpcommoninternalsprivate7 libprocessui4a katepart libmusicbrainz5-0 libkwineffects1abi4 libreoffice-base libkdepim4 kaddressbook soprano-daemon libmessageviewer4 libkwinglesutils1 libsoprano4 libqapt2-runtime vcdimager libcln6 libvirtodbc0 libbaloopim4 okular libqca2-plugin-ossl libkonq5abi1 ubuntu-release-upgrader-qt python3-pyqt4 libkephal4abi1 libksba8 kdesudo libqoauth1 gnupg-agent libxerces-c3.1 kde-telepathy-data kdelibs5-plugins kcalc libqmobipocket1 systemsettings libkolabxml1 libsyndication4 libkjsapi4 libplasmagenericshell4 libksane0 libkprintutils4 knotes libkactivities6 libincidenceeditorsng4 lightdm-kde-greeter libreoffice-sdbc-firebird libiso9660-8 kubuntu-docs amarok gwenview libkcalcore4 virtuoso-opensource-6.1-common libkmbox4 virtuoso-opensource-6.1-bin libakonadi-contact4 libakonadi-socialutils4 plasma-widget-kimpanel kde-touchpad python3-dbus.mainloop.qt libqtscript4-gui python3-pykde4 plasma-widget-menubar libxcb-record0 libkcompactdisc4 kde-config-telepathy-accounts libkabc4 libkunitconversion4 okular-extra-backends plymouth-theme-kubuntu-text libcryptsetup4 ktorrent-data libknewstuff3-4 kde-workspace-kgreet-plugins kde-config-tablet gstreamer0.10-qapt akregator libxcb-xtest0 libnepomukutils4 odbcinst1debian2 kate libkmanagesieve4 libprocesscore4abi1 libqtscript4-network libksane-data ibus-qt4 ttf-dejavu-core libyaml-0-2 libkxmlrpcclient4 plasma-nm libpam-ck-connector libqgpgme1 print-manager libksignalplotter4 libkipi-data klipper libakonadi-kmime4 gtk2-engines-oxygen kde-telepathy-text-ui libkhtml5 libkcal4 libkmime4 ksysguardd kontact libmailimporter4 libakonadi-calendar4 libprison0 libsendlater4 libntrack-qt4-1 libsignon-qt1 libkldap4 libkfile4 kubuntu-settings-desktop libpoppler-qt4-4 kamera libbaloofiles4 libtelepathy-qt4-2 libnoteshared4 libakonadi-kde4 libreoffice-kde icoutils libgrantlee-gui0 socat libkdepimdbusinterfaces4 audiocd-kio libmodemmanagerqt1 liboath0 libmessagecore4 libqtglib-2.0-0 kde-baseapps-bin kubuntu-driver-manager libattica0.4 libmygpo-qt1 libkdesu5 libknewstuff2-4 dragonplayer libdlrestrictions1 libgps20 kde-telepathy-send-file libstreams0 libkidletime4 libkateinterfaces4 libknotifyconfig4 qapt-deb-installer libtemplateparser4 about-distro dolphin kinfocenter libplasmaclock4abi4 amarok-common kaccessible libqtscript4-uitools libxcb-composite0 libkcalutils4 libreoffice-java-common usb-creator-kde libkdecore5 kdelibs-bin plasma-desktop skanlite kmag kdegraphics-strigi-analyzer nepomuk-core-runtime plasma-scriptengine-javascript libperl4-corelibs-perl qapt-batch kde-wallpapers-default libloudmouth1-0 libqaccessibilityclient0 libktnef4 libflac++6 libnepomuk4 libkleo4 odbcinst pam-kwallet libstreamanalyzer0 libkdcraw-data docbook-xsl libkntlm4 libopenconnect2 software-properties-kde ktorrent krdc kmousetool kde-workspace-data libqtscript4-core partitionmanager cryptsetup libvcdinfo0 libboost-thread1.54.0 libkfbapi1 libxcb-damage0 ruby1.9.1 libkcmutils4 libkpimidentities4 libreoffice-style-oxygen k3b libkworkspace4abi2 colord-kde libkfilemetadata4 kde-style-oxygen libdebconf-kde0 libktorrent-l10n libpolkit-qt-1-1 libkolab0 libepub0 libkdgantt2-0 kubuntu-settings-netbook libqtscript4-xml kubuntu-web-shortcuts libtelepathy-logger-qt4-1 libkactivities-models1 libkpimutils4 freespacenotifier pinentry-qt4 kde-config-gtk-style libkgapi2-2 baloo libkubuntu0 python3-sip kmix libkio5 libxml2-utils ksnapshot libktorrent5 libakonadi-kabc4 libpimcommon4 kde-config-whoopsie libkpgp4 khelpcenter4 oxygen-cursor-theme shared-desktop-ontologies libkexiv2-data libplasma3 muon-updater kde-config-pimactivity kde-telepathy libaccounts-qt1 kdepasswd libqtscript4-sql libkexiv2-11 libkontactinterface4 libmessagelist4 kde-telepathy-integration-module kdepim-runtime libkscreen1 && sudo apt-get install ubuntu-desktop
share|improve this answer
Do you have a link to the page where this command is? I believe I've seen it documented somewhere. – Eric Francis Jan 16 '15 at 17:31

You could use apt-rdepends to find all the packages that have been installed by (the meta package) kubuntu-desktop and use the list as the input to apt-get purge. Possibly purging kdelibs* should be sufficient.

Another possibility would be to remove Qt (i.e. libqt4*), since KDE ist dependent on qt it will remove all KDE packages. However, this does not work very well if other Qt applications are used on the other desktop.

However, in any case, inspect the packages that apt-get wants to remove very carefully, since potentially the whole installation could be messed up by something like this.

share|improve this answer

As Braiams didn't work for me, i did the following:

Go to /var/log/apt and search for "kubuntu-desktop" in history.log (or any of the compressed history.log.[n].gz files) to find the exact packages installed with kubuntu-desktop and remove them.

share|improve this answer

Try installing Synaptic Package Manager from the Software Center.

Or just type in a terminal: sudo apt-get install synaptic

Once you have installed and opened the program, in the sections tab, find the KDE Desktop Environment sections and select all installed (green) selections (Ctrl+Click). Then right click, select Completely remove and apply the changes by clicking the Green check mark at the top of the window.

share|improve this answer

This worked for me:

sudo apt-get install tasksel
sudo tasksel

find Kubuntu desktop in the list and remove its selection. Read and confirm the propmts.

After this I also did

sudo apt-get autoremove
share|improve this answer

The answer is at : and

1) Choose the method corresponding to your ubuntu version

2) Check which programs from the KDE environment you would like to keep because you need it and a) remove it from the removal list (with dependencies) or b) leave it in the list and reinstall it later.

3) Copy/past the command The command is as stated in this webpage and depends on your version, but generally looks like :

sudo apt-get remove akonadi-backend-mysql akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao .... and a lot of packages

The command will not remove configuration files anyway, only the programs. If you want to also remove the config files, you will add the --purge option to the command.


Warning: The list of packages below is for a plain default install of Ubuntu with Kubuntu. You may want to keep some of the below packages and you should review what apt is going to remove before accepting.

These removal commands were created based on what Kubuntu, Xubuntu, etc. packages were added to a default Ubuntu installation. It's possible that the commands might remove some other packages you have since added to the default and want to keep. If that's the case, keep track of which packages those are and reinstall them. Your settings should still be there.

As always,backup your partition before modifying it.

Cheers, Raph

share|improve this answer

the proposed solution via aptitude does not work with the default kubuntu 14.04 installation, failing with an error message that says it can not find a solution.

A simple alternative, although likely not removing 100% was to do

    sudo apt-get remove plasma*

This removed kde applications like kmail, k3b, kopete, digikam,and the desktop.

share|improve this answer

in 14.04 LTS 64Bit

$ sudo apt-get remove kubuntu-desktop

$ sudo apt-get autoremove

Then logout and login again!

share|improve this answer

protected by Braiam May 18 at 23:30

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.