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..)

  • My general experience is that it is difficult and risky to remove a desktop environment. It is usually easier (and faster) to backup the files that you want to keep and make a fresh installation and avoid adding things that you don't want. After the installation you can copy the files that you backed up into your fresh system.
    – sudodus
    Nov 23 '18 at 17:17
  • In theory it should work. I would suggest backup first and if you have any problems reinstall kde and if that fails reinstall with the kde spin.
    – Panther
    Nov 23 '18 at 17:37

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
  • I did this recently on F33 and noticed that sddm was not installed; I had to install it myself afterward. Apr 30 at 23:49

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.

  • 6
    Better to do dnf swap @gnome-desktop @kde-desktop. Mar 15 '19 at 17:58
  • 1
    Didn't know that command @MichaelHampton. Seems like a neat option!
    – SanChaeZ
    Mar 15 '19 at 18:10
  • @MichaelHampton That can be a separate answer
    – Anwar
    May 20 '19 at 15:28
  • @MichaelHampton I guess your answer should be the accepted answer here. Can you post it as such so I can accept it? Thanks to SanChaez as well! May 21 '19 at 17:23

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.

  • Hi, thanks. I ended up reinstalling the KDE Plasma edition instead. By the way, you should use comments instead of answers if you have information to add but can't solve the question. Answers are for answers only (hence the name), which is why you received a few downvotes I imagine. Jan 9 '19 at 4:57
  • Yeah, I know. I would have done that, but I don't have 50 reputation on Unix+Linux so I couldn't comment. It's unfortunate that most people just down-vote without considering new contributors on a StackExchange site. I had this same problem a few times with Fedora, so I wanted to share my experience, just in case someone might come across this question! Jan 9 '19 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.