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.
- 815
3 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-raspitoo) - 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 autoremoveagain
- 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
- 512
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
/homedirectory. - 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.
- 8,278
- 3
- 35
- 60
Due to this: https://gitlab.gnome.org/GNOME/gnome-mines/-/issues/86, I was inspired to finally try Plasma- something I've been thinking about doing for years. This post was helpful as reference, so I thought I'd add the process I used. Side note: the machine I'm doing this to had Hirsute Hippo, (21.04 LTS), installed originally and was on Jammy at the time of writing. Yeah, I know, I should reinstall the OS, but I'm lazy. The timing couldn't be more perfect though, since 24.04 LTS is out. Doing a release upgrade will do some extra cleaning of the installed packages! All the same, since I'm a bit peeved, I went hard with the removal; see below:
##### Decided to remove some unwanted stuff from my apt sources as a precursor.
1944 cat /etc/apt/sources.list > ~/Desktop/aptSourceList.bak
1945 cat ~/Desktop/aptSourceList.bak
1946 cat /etc/apt/sources.list
1947 sudo nano /etc/apt/sources.list
1948 ls -lah /etc/apt
1949 ls -lah /etc/apt/sources.list.d
1951 sudo rm /etc/apt/sources.list.d/brave*
##### ...
1956 sudo apt update
1957 sudo apt autoclean
1958 sudo apt autoremove
1960 sudo snap refresh
1961 reboot
1962 sudo apt update
1963 sudo apt upgrade -y
##### Run the command; **DO NOT** confirm.
1964 sudo apt-mark minimize-manual
##### Pick out the one for Gnome in the output from the above, and set it to auto.
1966 sudo apt-mark auto gnome-shell-extension-appindicator
1967 sudo apt update
1968 sudo apt search kubuntu
1969 sudo apt info kubuntu-desktop
1971 sudo apt install kubuntu-desktop -y
1979 reboot
1980 sudo snap refresh
1981 sudo apt update
1982 sudo apt autoclean
1983 sudo apt autoremove
1984 sudo apt list --installed | grep gnome
1986 sudo apt purge *gnome*
1987 sudo apt update
1988 sudo apt autoclean
1989 sudo apt autoremove
1990 sudo apt update
1991 sudo apt list --upgradable
1992 sudo apt upgrade -y
1993 reboot