I installed Fedora Workstation 41 a while ago. Now i installed KDE from groups using sudo dnf group install kde-desktop
, and i have hyprland installed, but i want to remove gnome from my environments. How can i do this?
$ dnf environment info workstation-product-environment
Updating and loading repositories:
Repositories loaded.
Id : workstation-product-environment
Name : Fedora Workstation
Description : Fedora Workstation is a user friendly desktop system for laptops and PCs.
Order : 2
Installed : False
Repositories : fedora, updates
Required groups : core
: networkmanager-submodules
: hardware-support
: fonts
: multimedia
: guest-desktop-agents
: printing
: firefox
: libreoffice
: desktop-accessibility
: base-graphical
: gnome-desktop
: container-management
: workstation-product
Optional groups : domain-client
$ dnf group info gnome-desktop
Updating and loading repositories:
Repositories loaded.
Id : gnome-desktop
Name : GNOME
Description : GNOME is a highly intuitive and user friendly desktop environment.
Installed : yes
Order :
Langonly :
Uservisible : no
Repositories : @System
Mandatory packages : dconf
: gdm
: gnome-boxes
: gnome-connections
: gnome-control-center
: gnome-initial-setup
: gnome-session-wayland-session
: gnome-settings-daemon
: gnome-shell
: gnome-software
: gnome-text-editor
: nautilus
: polkit
: ptyxis
: yelp
Default packages : ModemManager
: NetworkManager-adsl
: NetworkManager-openconnect-gnome
: NetworkManager-openvpn-gnome
: NetworkManager-ppp
: NetworkManager-pptp-gnome
: NetworkManager-ssh-gnome
: NetworkManager-vpnc-gnome
: NetworkManager-wwan
: PackageKit-command-not-found
: PackageKit-gtk3-module
: adobe-source-code-pro-fonts
: avahi
: baobab
: evince
: evince-djvu
: fprintd-pam
: glib-networking
: gnome-backgrounds
: gnome-bluetooth
: gnome-browser-connector
: gnome-calculator
: gnome-calendar
: gnome-characters
: gnome-classic-session
: gnome-clocks
: gnome-color-manager
: gnome-contacts
: gnome-disk-utility
: gnome-epub-thumbnailer
: gnome-font-viewer
: gnome-logs
: gnome-maps
: gnome-remote-desktop
: gnome-system-monitor
: gnome-user-docs
: gnome-user-share
: gnome-weather
: gvfs-afc
: gvfs-afp
: gvfs-archive
: gvfs-fuse
: gvfs-goa
: gvfs-gphoto2
: gvfs-mtp
: gvfs-smb
: librsvg2
: libsane-hpaio
: loupe
: mesa-dri-drivers
: mesa-libEGL
: rygel
: sane-backends-drivers-scanners
: simple-scan
: snapshot
: sushi
: systemd-oomd-defaults
: totem
: tracker
: tracker-miners
: xdg-desktop-portal
: xdg-desktop-portal-gnome
: xdg-desktop-portal-gtk
: xdg-user-dirs-gtk
It looks like removing the gnome-*
packages would be enough (i.e. sudo dnf remove gnome-\*
).
You might want to switch your Desktop Manager from GNOME Desktop Manager to something else like SDDM first. (systemctl disable gdm.service
&& systemctl enable sddm.service
)
it says gnome-shell is a protected package, so i cant uninstall all gnome.
❯ sudo dnf remove gnome-\*
[sudo] password for karpa:
Failed to resolve the transaction:
Problem: The operation would result in removing the following protected packages: gnome-shell
Hello @karpa ,
You’re really better off reinstalling the KDE version instead IMO.
Try running the following first:
sudo dnf swap fedora-release-identity-workstation.noarch fedora-release-identity-kde.noarch
There really isn’t much more to a release than a collection of packages.[1][2] You don’t have to reinstall. You can mix and match things and that is how it was done in times past.
The one exception I’m aware of is that the Jam spin customizes the kernel parameters slightly. It adds
threadirqs
as can be seen here ↩︎The “recipes” for the spins can be found here: Overview - fedora-kickstarts - Pagure.io
You can see that they are adding/removing packages and package groups. ↩︎
Try
sudo dnf remove --no-autoremove gnome-*
or
sudo dnf remove gnome-desktop
or
sudo dnf group remove gnome
Sorry I can’t remember exactly, but one can definitely remove Gnome without too much trouble - I have done it!
Yeah, you can remove the whole gnome-desktop group. The thing to watch out for there is that it might remove a package that also belongs to the kde-desktop group (e.g. PackageKit-command-not-found). I have seen it do that in the past anyway. But there have been many improvements to dnf with the new version 5 release, so maybe it is a little more clever now. If it does remove a “common” package, the fix is simple – just run dnf group install kde-desktop
again. Even if you don’t (re)install the kde-desktop group right away, it will probably happen automatically on your next system upgrade.
This work to me, after this i just run
sudo dnf remove gnome-\*
as @theprogram said.
Thanks to both of us
Conclusion:
Run first:
sudo dnf swap fedora-release-identity-workstation.noarch fedora-release-identity-kde.noarch
Run second:
sudo dnf remove gnome-\*
The first command remove the secure for the gnome-shell package changing the identity of my fedora distro, and after that i’m free to remove the gnome packages.