How to completely remove kubuntu-desktop from Ubuntu

101,180

Solution 1

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:

Xubuntu

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

Lubuntu

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

Gnome

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(
    ?and(
        ?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
              ?priority(required),
              ?priority(important)
             )
         )
    )

Solution 2

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.

Solution 3

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

Solution 4

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

Solution 5

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:
101,180

Related videos on Youtube

kostandinangjellari
Author by

kostandinangjellari

Updated on September 18, 2022

Comments

  • kostandinangjellari
    kostandinangjellari almost 2 years

    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?

  • Jacques MALAPRADE
    Jacques MALAPRADE over 9 years
    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.
  • Braiam
    Braiam over 9 years
    @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
    Braiam over 9 years
    @JacquesMALAPRADE run apt-get -s autoremove and tell me the output.
  • Jacques MALAPRADE
    Jacques MALAPRADE over 9 years
    Hi Braiam. here it is: Reading package lists... Done Building dependency tree Reading state information... Done 0 to upgrade, 0 to newly install, 0 to remove and 38 not to upgrade. I have to add that it did run this command before without the -s.
  • Braiam
    Braiam over 9 years
    @JacquesMALAPRADE it doesn't make sense... use search instead of remove, upload the output somewhere so I can see it.
  • Jacques MALAPRADE
    Jacques MALAPRADE over 9 years
    I have the content just don't know how I can send this to you. It is a bit too big for this box. Any suggestions for sites I can use to dump the data?
  • Braiam
    Braiam over 9 years
    @JacquesMALAPRADE any pastebin will do.
  • Braiam
    Braiam over 9 years
    @JacquesMALAPRADE I don't see ubuntu-desktop package anywhere. Run it with remove and copy everything, from the command you issued till the end.
  • Jacques MALAPRADE
    Jacques MALAPRADE over 9 years
    The first part stops after not finding a solution and is found here. paste.ubuntu.com/9717352 I am running the second part after the try harder bit. It is here that it comes up with ubuntu-desktop
  • Jacques MALAPRADE
    Jacques MALAPRADE over 9 years
    It asked to try harder again and then came up with the following which clearly states that ubuntu-desktop will be removed. paste.ubuntu.com/9717405 . along with skype, evolution etc....
  • Braiam
    Braiam over 9 years
    @JacquesMALAPRADE for some reason it selects libc6, so I just manually prevent any required or important package from being uninstaled. That should prevent ubuntu-desktop from being selected.
  • Pantelis Sopasakis
    Pantelis Sopasakis over 9 years
    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...
  • Braiam
    Braiam over 9 years
    @PantelisSopasakis it should not remove anything important. I've added the packages at the end to force aptitude to leave them installed, but when I tested this it was doing what it was supposed to do.
  • Pantelis Sopasakis
    Pantelis Sopasakis over 9 years
    @Braiam that's what I supposed as well... I've got no idea what happened.. At least, I backed up my files from recovery mode...
  • Gaurav Gandhi
    Gaurav Gandhi almost 9 years
    It ruined my system too. Now i have some unmet dependencies, if install vlc or qBitorrent.
  • snorp
    snorp over 8 years
    This definitely is removing way too much. You should not use this solution or at least be prepared to full reinstall unity/ubuntu-desktop and the other base install apps after you do this.
  • Braiam
    Braiam over 8 years
    @snorp it shouldn't not happen, since ubuntu-desktop (or any other metapackage) is being explicitly installed.
  • mohammed amine bourkadi
    mohammed amine bourkadi about 8 years
    Im using ubuntu 16.. is it the same?
  • Braiam
    Braiam about 8 years
    @mohammedaminebourkadi my answer is dynamic, so it should work with any version of Ubuntu from here until the end of times.
  • Cerin
    Cerin almost 8 years
    What are you supposed to do with this output? Manually copy and paste each package into apt-get purge?
  • Braiam
    Braiam almost 8 years
    @Cerin if you are satisfied with the outcome of the search, you can simply replace search with remove.
  • toesslab
    toesslab over 7 years
    Synaptic is a great tool! I recommend it. But as always when doing big changes to your system, do a backup first!
  • Joao Carlos
    Joao Carlos almost 5 years
    This removes everything from your system. Dont do it.
  • Max von Hippel
    Max von Hippel almost 5 years
    @JoaoCarlos can you explain what you mean by "everything"?
  • Joao Carlos
    Joao Carlos almost 5 years
    @MaxvonHippel it removes the windowing system, all programs, all drivers, everything. Your system wont boot anymore except for what ever you select (ie. nothing)
  • Mr Coder
    Mr Coder over 4 years
    It removes everything thing , why I did it :(
  • mchid
    mchid over 2 years
    NOTE: because of a bug in tasksel, DO NOT use tasksel to uninstall packages. ONLY use tasksel to install.