Can Gnome Be Safely Removed If I've Switched Desktop Environment?

I originally installed Fedora at, I think, version 27, using the default Gnome desktop. Since then I’ve experimented with other desktops and I tend to flip back and forth between Plasma and Cinnamon now and haven’t even loaded Gnome for ages.

I’m wondering if it’s safe to remove Gnome from my system to free up some space. If so, what’s the best way to do it? Remove the group through DNF?

I’m hoping that I really don’t need to reinstall with a different spin if I want Gnome gone.

Thanks!

I doubt it will be possible to remove the gnome desktop environment without destroying the system. I would assume there are too many dependencies that will be uninstalled but are still required by the other DE.
I you dare to try this, make sure you have a safe backup of everything that is important to you.
Installing a Fedora with the DE of your choice is probably faster than fixing the problems after removal of Gnome.

2 Likes

That’s pretty much what I was thinking. :frowning:

Maybe it’s a topic for a new thread, but I’ll ask anyway. Let’s say I was going to wipe everything out and reinstall the Fedora KDE spin. Is there an easy command I can run to get a list of all the programs I have installed so I can easily install them again on the new system?

I can back up all my files and copy them back without a problem, but I don’t want to spend the next 2 months stopping in the middle of work because I just realized I forgot to install another program that I had been using. Is it possible somehow to get a list of installed applications as opposed to just a raw list of installed packages?

I messed around with trying to remove KDE for months. People gave me all kinds of suggestions that they claimed would work, but all of them wanted to take the guts of the system with them. I finally bit the bullet and did a clean reinstallation.

Assuming you used dnf to installed those programs: I don’t know if dnf has a command that specifically lists packages installed by the user, but there’s a history command. sudo dnf history userinstalled might be what you’re looking for, but in my case it includes stuff I don’t remember installing (I’ve had the same installation of Fedora for a long time tho).

If that isn’t it you can run sudo dnf history and sudo dnf history info N where N is the transaction number and play around with grep a little to make a machine-readable list of packages.

For backing up and restoring files I recommend rsync’s -aAX switches to preserve attributes.

2 Likes

  "Finally-also:  Your can make a list of all installed packages with something like (See also a DNF built-in way of 8-th post):"

2 Likes

It’s safe. I’ve done the same thing since Fedora 28. I’ve gone from Gnome to KDE, Cinnamon, and XFCE, and back again. When you remove the “GNOME Desktop Environment” group it will likely remove the GDM package which is your login manager. I’d recommend before doing so to log out from your WM, switch to a virtual console (Ctrl + Alt + F2), install LightDM or SDDM and then run:

systemctl disable gdm.service
systemctl enable sddm.service (Or whichever you decide to use)

Yes, I do this as part of my daily backup routine:

dnf --cacheonly repoquery --qf "%{name}" --userinstalled > userinstalled_$(hostname).txt

2 Likes

Ah that’s awesome. I’ll back stuff up and give it a shot. Thanks!

rpm -qa >> my_packages.txt

You shouldn’t have to though. From the console you can run the following to undo whatever you just did

dnf history undo <transaction-id>

Excellent. Thanks so much for that.

1 Like