13

I'm currently running Ubuntu 20.04 with GNOME. However I would like to switch to KDE Plasma without actually installing Kubuntu from scratch. I then want to remove GNOME. So I thought I would do the switch by installing the kubuntu-desktop package, selecting KDE as my desktop environment, and then removing the ubuntu-desktop package, which to my understanding includes GNOME. Is this how I should go about doing it, or am I missing something? I'm not entirely sure because the description for ubuntu-desktop says it is also used to help ensure proper upgrades, so it is recommended that it not be removed.

4
  • 2
    For years I installed Ubuntu flavor desktops by downloading the Ubuntu Desktop version I wanted (that ISO I could get bandwidth quota free), installed it; changed the upload mirror to my ISP's mirror (so packages/upgrades were quota free and were an official mirror) then removed ubuntu-desktop & added the flavor desktop I wanted.. I did this high tens of times. The install of kubuntu-desktop will cause all required bits to install that are in common with ubuntu-desktop. The best method varied a little on release but issues are few
    – guiverc
    Feb 3, 2022 at 2:13
  • 3
    Install kubuntu-desktop, but trust me... don't uninstall ubuntu-desktop. At the login screen, select your login username, then click on the icon in the lower-right of your screen, select the desired DE, enter your password, and be happy.
    – heynnema
    Feb 3, 2022 at 3:30
  • 1
    I do ~agree with @heynnema, in that for some releases removing the ubuntu-desktop can create issues that need to be worked around (other releases there will be none) & I don't bother removing them often myself usually. I love the multiple-desktop choice at login, and being able to use my machine normally today (Lubuntu/LXQt for me), my other favorite (Xubuntu/Xfce), but on occasion when I need change Ubuntu/GNOME etc.. Leaving the first (ubuntu-desktop) installed does not in my experience create issues; more disk space & bandwidth due to more updates etc, all of which are minimal
    – guiverc
    Feb 3, 2022 at 3:36
  • 3

2 Answers 2

7

Well, I have tried this, and it worked fine.

Although, the question is for Ubuntu 20.04.. I used 21.10.

Update: Also did this on another box that's running 22.04. That worked too.

Here's what I've done:

  • Starting point: Ubuntu 21.10, with the GNOME desktop
  • Update everything: sudo apt update; sudo apt upgrade
  • sudo apt-mark minimize-manual *Docs here
  • Add KDE (via Kubuntu's meta-package): sudo apt install kubuntu-desktop
  • Uninstall the GNOME meta-package: sudo apt remove ubuntu-desktop (Depending on your installation type, remove ubuntu-desktop-minimal, or ubuntu-desktop-raspi too)
  • Log out and log into a KDE session!
  • Clean up packages that aren't needed: sudo apt autoremove
    This is when GNOME actually gets removed. Warning: Be extra careful at this step:
    • Review the packages proposed to be removed
    • If there's one you want to keep, abort the command, and mark the package(s) explicitly installed via: sudo apt install <package1> <package2> ...
    • Then try sudo apt autoremove again
  • At this point, you're pretty much done. However, there might be some leftover GNOME packages. Check what's installed
  • In my case, there were 3: sudo apt remove gedit evince firefox; sudo apt autoremove
  • Done. Everything works, even the boot logo has been changed to Kubuntu's
1
  • 1
    It would have been nice if who downvoted, gave an explanation. It seems a legit answer.
    – funder7
    Jun 21, 2022 at 8:49
2

TL;DR: Do a fresh installation of Kubuntu OR keep both the desktop environments.

Your title includes the word "safely" which indicates you don't want to break things, so doing a fresh install is the best option.

  1. Backup you entire /home directory.
  2. Download the Kubuntu ISO for your version of Ubuntu. Given that you have focal fossa, the Kubuntu 20.04 ISO should work for you. Download the ISO labelled Desktop Image from here.
  3. Download balenaEtcher. Get the x64 Linux version. Extract the zip. In a terminal, go into the extracted zip folder. Once you're there, if you do ls, you should see a file that ends in .AppImage. Do chmod +x balenaEtcher-1.7.3-x64.AppImage.
  4. Run balenaEtcher with ./balenaEtcher-1.7.3-x64.AppImage.
  5. Find a flash drive that is bigger than 8GB in capacity, and put it on your computer. All data on this flash drive will be destroyed.
  6. Select the downloaded ISO, and select the flash drive. Hit Flash.
  7. Once it's done, reboot your computer, enter the boot menu, and select the name of the USB Drive.
  8. Go through the installation; configure it; install.

You want the interface of KDE plasma, right? So, why remove GNOME?

Removing a desktop environment (especially the default one) is not at all recommended. If Ubuntu used the Vanilla GNOME (gnome-session) then the situation was different. But Ubuntu uses a modified version of GNOME creating things more difficult. Your idea of switching to KDE is good, but removing GNOME is silly.

Ubuntu depends on the GNOME desktop. Uninstalling GNOME will break many things your whole distribution! Many application like Firefox, Gnome disks and so on does not depend on the ubuntu-desktop package. So, removing it is not enough.

Should I remove ubuntu-desktop?

NO! Removing Ubuntu Desktop will not remove the entire GNOME and will break many things. Ubuntu Desktop is just a meta-package that depends on GNOME Desktop. We can say that this meta-package was created to ensure that GNOME doesn't get easily removed. If you run apt remove ubuntu-desktop --simulate you'll find that only the package will be removed, its dependencies would be marked for removal, which would be removed when you'll run apt autormeove.

In short, removing this package won't remove GNOME and will do additional package breakage.

N.B: You won't be able to easily install Ubuntu desktop again after purging this package because of several dependency issues.

I still want to purge GNOME and install KDE plasma.

Warning: Using this method in a graphical environment with GNOME shell running, may caus several issues, consider doing this in a recovery shell or TTY

It is completely up to you if you want to give it a shot, then you can follow this answer given by N0rbert and purge GNOME:

sudo apt update
sudo apt purge adwaita-icon-theme gedit-common gir1.2-gdm-1.0 \
gir1.2-gnomebluetooth-1.0 gir1.2-gnomedesktop-3.0 gir1.2-goa-1.0 \
gnome-accessibility-themes gnome-bluetooth gnome-calculator gnome-calendar \
gnome-characters gnome-control-center gnome-control-center-data \
gnome-control-center-faces gnome-desktop3-data \
gnome-font-viewer \
gnome-initial-setup gnome-keyring gnome-keyring-pkcs11 gnome-logs \
gnome-mahjongg gnome-menus gnome-mines gnome-online-accounts \
gnome-power-manager gnome-screenshot gnome-session-bin gnome-session-canberra \
gnome-session-common gnome-settings-daemon gnome-settings-daemon-common \
gnome-shell gnome-shell-common gnome-shell-extension-appindicator \
gnome-shell-extension-desktop-icons gnome-shell-extension-ubuntu-dock \
gnome-startup-applications gnome-sudoku gnome-system-monitor gnome-terminal \
gnome-terminal-data gnome-themes-extra gnome-themes-extra-data gnome-todo \
gnome-todo-common gnome-user-docs gnome-user-docs-ru gnome-video-effects \
language-pack-gnome-en language-pack-gnome-en-base language-pack-gnome-ru \
language-pack-gnome-ru-base language-selector-gnome libgail18 libgail18 \
libgail-common libgail-common libgnome-autoar-0-0 libgnome-bluetooth13 \
libgnome-desktop-3-19 libgnome-games-support-1-3 libgnome-games-support-common \
libgnomekbd8 libgnomekbd-common libgnome-menu-3-0 libgnome-todo libgoa-1.0-0b \
libgoa-1.0-common libpam-gnome-keyring libsoup-gnome2.4-1 libsoup-gnome2.4-1 \
nautilus-extension-gnome-terminal pinentry-gnome3 yaru-theme-gnome-shell
sudo apt purge gnome-getting-started-docs gnome-getting-started-docs-ru*

sudo apt autopurge

And then:

sudo apt install kubuntu-desktop^

So what is the conclusion?

Stick to GNOME or do a fresh installation if Kubuntu.

3
  • Thanks for a thorough answer, but the last part about KDE is subjective and unnecessary. I never wrote that KDE is better than X or Y. And some people actually prefer configuring and tweaking stuff. If I wanted everything spoon-fed to me then I wouldn't be running Linux in the first place... Btw, the codename for my version of Ubuntu is Focal Fossa (20.04), not Impish.
    – Fadi
    Feb 4, 2022 at 16:55
  • @Fadi Did you succeed in the end? I installed Plasma but am currently considering whether I should attempt to remove Gnome
    – P Varga
    Apr 29, 2022 at 20:47
  • 1
    @ᅙᄉᅙ I didn't go through with it actually, still using GNOME. Removing the ubuntu-desktop package is probably a bad idea.
    – Fadi
    Apr 30, 2022 at 10:32

You must log in to answer this question.

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