How to properly switch from KDE to GNOME and cleanup kde afterwards, without reinstalling?

Hi.

I’d like to perform a complete desktop switch, from KDE —> to GNOME, in the most clean way possible, without reinstalling. Topic is Fedora 42.

My goal: To convert my current KDE deployment into a GNOME deployment, just the way as if I installed my computer freshly from a GNOME iso, while not performing a clean reinstall, but retaining all the manually installed package selections (like my printer driver, spotify, discord etc…) at the same time, and clean up the previous DE completely and safely, in order to get rid of duplication apps from previous DE.

I know there’s a official doc of how to “switch” desktops, however that doc just only shows how to install a new DE next to the current one, but the cleanup procedure of the previous DE is not detailed actually.

I have a dummy PC, where I performed the switching, but eventually ended up the way this guy experienced here.

What I did is followed the guide and did a:

dnf in @workstation-product-environment

then after it was done, I wanted to perform a:

dnf rm @kde-desktop-environment

however it wanted to also remove these:

But the problem with that is, I have another second dummy machine, where a pure GNOME is installed (from GNOME iso), and I checked the installed groups there, and for example Standard is part of it, so I have no idea why it wants to remove Standard, while it holds crucial packages (fpaste max time is 24hours, so if link is no longer available, the paste was the output of dnf group info standard -which is equal to everyone)

Additional infos for environment list and group list currently on my system:

Additionally, I’m not sure why, but fedora-release-identity-workstation didn’t install with the workstation-product-environment (however fedora-release-workstation did, but both are mandatory – afaik).

Also side note to devs visiting this post, you see there’s a duplication in the output of dnf environment list for workstation and kde? Why’s that?

Additionally, to clarify, yes I am aware that I will have to also enable gdm service for gnome, but for now sddm is used till we figure out how to clean up plasma first)

Thanks in advance for helping

Log out from KDE to a basic TTY terminal.
Remove the KDE group. An annoying thing about KDE is that it links so many things together as dependencies.
Once KDE is removed, install Gnome.

2 Likes

This is how I do it. I go nuclear, rather than using dnf swap and I always remove the currently installed desktop first, so it doesn’t matter what is removed.

Drop to tty ctrl + alt + Fwhatever

Remove KDE and all associated programs / libraries and support packages.
sudo systemctl disable sddm.service
sudo dnf remove @kde-desktop
sudo dnf remove kf5* kf6* plasma*
sudo dnf autoremove
Then I remove all the dotfiles and dot folders chock full of rubbish left behind by KDE. The only dot files I keep are the bash ones and the only dot folder I keep is the mozilla one. The only thing left installed will be Qt / KDE apps that you installed manually that aren’t got by pulling kf5*, kf6* and plasma* out from under them.

Then I install GNOME.
sudo dnf install @workstation-product
sudo systemctl set-default graphical.target
sudo systemctl enable gdm.service

Then reboot.

2 Likes

Thanks for both your answers, unfortunately neither produces a clean post-result, there are remainers still residing from plasma and Qt packages too - eg. the main plasma-desktop (and I checked, there’s no more protection against that package under /etc/dnf/protected.d , and yet still those didn’t get removed, neither with autoremove nor with distro-sync –allowerasing) :person_shrugging:

you have to swap fedora-release-kde and fedora-release-identity-kde with

fedora-release-identity-workstation-42-30.noarch
fedora-release-workstation-42-30.noarch

see also Is it possible to switch completely to KDE from GNOME? - #5 by vgaetera (Gnome to KDE)

but you will never get an exact version compared to a reinstall.

Thank you, yeah I’ve also read that thread these days when I was experimenting around, but I keep leaning towards to the conclusion that there’s no cleaner way of doing this, without an reinstall. Well, darn it. :confounded_face:

Edit: Btw yeah, both the identity and release are already pulled in, so that’s why I’m shocked of why the autoremove and distro sync combo doesnt clean up the junk dependencies of plasma >.<

Not marking the thread as solved yet, so people will get “lured” here for some more brainstorming, well my dummy PC is there for some major experimenting (sorry SSD, but this is for a greater good xD) so I’m open to all ideas :’D

For now, @theprogram ‘s approach seems to be the closest to a cleaner switch (soon, after enough brainstorming in the topic, I will mark yours as solution), with some minor post-install cleanups.