This question is similar to What is secure to remove from GNOME Desktop => GNOME (but not a duplicate).
I want to remove the GNOME desktop environment. Running the proposed command in this question does not work on Fedora 29.
$ sudo dnf group remove gnome-desktop-environment Warning: Group 'gnome-desktop-environment' is not installed. Error: No groups marked for removal.
I noticed there is a group called gnome-desktop instead.
However, sudo dnf group remove gnome-desktop lists hundreds (all?) of installed packages for removal. It includes packages that are not at all related to GNOME (such as lib*, plasma-*, texlive-*, …). I fear that running this command will force me to do a full re-install of the system.
Is there a safe way to remove GNOME’s desktop environment from Fedora 29 that leaves me with a functioning KDE install?
I just want to reclaim some disk space (not all of it..)
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You can actually remove and install packages in the same operation, with dnf swap. And since the option takes groups as well as just single package names, you can switch one for another very simply:
dnf swap @gnome-desktop @kde-desktop
Method 2
As the other answer point out, you can remove all of GNOME with # dnf group remove gnome-desktop. This will delete most of the packages even not related to GNOME itself (Xorg for example).
However if you just want to switch from one DE without complete reinstall, you can install other environment with e.g. # dnf groupinstall kde-desktop. This will bring back X and all the nessesary packages as in fresh Fedora spin.
One annoying little thing I found is that you have to reinstall packages like chromium using dnf. They will keep their configs though, so it wasn’t a huge deal for me.
Method 3
This is probably no a satisfying answer, but I don’t think so. I recently tried to remove gnome from Fedora 29 to switch to i3. After setting the window manager up, I used $ sudo dnf group remove gnome-desktop to ‘just’ get rid of gnome and I wasn’t even able to start up an xserver afterwards. As you said, $ dnf group remove gnome-desktop-environment seems to be obsolete. I found this thread to be interesting, too.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0