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.
2 Answers
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, removeubuntu-desktop-minimal
, orubuntu-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
-
1It would have been nice if who downvoted, gave an explanation. It seems a legit answer.– funder7Jun 21, 2022 at 8:49
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.
- Backup you entire
/home
directory. - 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.
- 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
. Dochmod +x balenaEtcher-1.7.3-x64.AppImage
. - Run balenaEtcher with
./balenaEtcher-1.7.3-x64.AppImage
. - 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.
- Select the downloaded ISO, and select the flash drive. Hit Flash.
- Once it's done, reboot your computer, enter the boot menu, and select the name of the USB Drive.
- 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.
-
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.– FadiFeb 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 VargaApr 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.– FadiApr 30, 2022 at 10:32
ubuntu-desktop
& added the flavor desktop I wanted.. I did this high tens of times. The install ofkubuntu-desktop
will cause all required bits to install that are in common withubuntu-desktop
. The best method varied a little on release but issues are fewkubuntu-desktop
, but trust me... don't uninstallubuntu-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.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