You installed a desktop environment to test it, and now you want it gone
You installed the KDE Plasma group to see if the workflow suited you. You spent a week adjusting tiling rules and fighting SDDM themes. Now you want your clean GNOME workspace back, but you don't want a system clogged with half a gigabyte of orphaned packages and a display manager that refuses to die. You run a removal command, but the transaction list looks terrifying. You worry about breaking your login screen or deleting the only way to see a graphical interface.
The process is safe if you use the right tools and verify the state before rebooting. Fedora's package manager handles dependencies, but it relies on you to manage the display manager and clean up leftovers. Follow the steps below to remove the environment, switch the login screen, and reclaim disk space without locking yourself out.
What package groups and display managers actually do
Fedora organizes desktop environments into package groups. A group is a curated list of packages that work together, defined in the repository metadata. When you install a group, dnf pulls in the group packages plus all their dependencies. Removing the group removes the group packages. It does not automatically remove dependencies that other packages still need.
If you installed KDE alongside GNOME, dnf keeps shared libraries like GTK or Qt because GNOME still requires them. If you remove KDE, those libraries stay. If you remove the last package needing a library, dnf autoremove can clean it up. Skipping the cleanup step leaves "dependency dust" on your system. This dust consumes disk space and shows up in future update lists, even though you no longer use it.
The display manager is a separate service. GDM serves GNOME. SDDM serves KDE. LightDM serves other environments. The display manager runs before you log in. It presents the login screen and starts your session. If you remove KDE but SDDM remains enabled, your login screen might still try to start SDDM. SDDM may fail because its dependencies are gone, or it may start but cannot launch a session. You must disable the old display manager and enable the one that matches your remaining desktop.
Config files in /etc/ are user-modified. Files in /usr/lib/ ship with packages. Never edit files in /usr/lib/. Use dnf to manage packages. Manual file deletion breaks SELinux contexts and package verification. If you manually delete files, dnf cannot track them, and the system state becomes inconsistent. Trust the package manager. Manual file edits drift, snapshots stay.
Remove the desktop environment and clean up
Start by identifying the exact group name. Group names are case-sensitive and often contain spaces. Use dnf group list installed to see what is currently on the system.
Here's how to list installed groups and find the name you need.
dnf group list installed
# List all installed package groups to find the exact name
# Group names are case-sensitive and often include spaces
# Look for entries like "GNOME", "KDE Plasma Workspaces", or "Xfce"
Review the output. You will see IDs and names. Use the name in quotes for the removal command. If you are unsure what a group contains, check the package list before removing. This prevents surprises when the transaction starts.
Here's how to inspect a group before you remove it.
dnf group info "KDE Plasma Workspaces"
# Show the package list contained in the group
# This helps you verify what will be removed before committing
# Look for 'Mandatory' and 'Optional' package sections
Once you confirm the group name, run the removal. dnf calculates the transaction and shows what will be removed. Review the list carefully. If the list includes packages you recognize as essential to your remaining desktop, stop and check the group name. A correct removal only removes packages belonging to the target environment.
Here's the command to remove the group.
sudo dnf group remove "KDE Plasma Workspaces"
# Remove the entire KDE group including metapackages
# dnf calculates the transaction and shows what will be removed
# Review the list carefully before typing 'y' to confirm
After the group removal completes, run autoremove. This is the safety net. autoremove scans the system for packages that were installed as dependencies and are no longer required by any installed software. It removes them, reclaiming disk space.
Here's how to clean up orphaned dependencies.
sudo dnf autoremove
# Remove packages that were installed as dependencies
# These packages are no longer required by any installed software
# This reclaims disk space and reduces update noise
Run autoremove immediately. Orphaned packages accumulate silently and waste disk space.
Verify the removal and display manager
The desktop environment is gone, but the display manager might still be pointing at the old service. Check the status of your remaining display manager. If you kept GNOME, GDM should be active. If you kept KDE, SDDM should be active.
Here's how to check the display manager status.
systemctl status gdm
# Check that GDM is active and running
# Look for "Active: active (running)" in the output
# If the service is inactive, you need to enable it
If the service is inactive or disabled, enable it and disable the old one. Use systemctl disable to stop the old manager from starting on boot. Use systemctl enable to make the new manager the default.
Here's how to switch the display manager.
sudo systemctl disable sddm
# Disable the KDE display manager so it does not start on boot
# systemctl creates a symlink to disable the service unit
sudo systemctl enable gdm
# Enable the GNOME display manager as the default login screen
# This ensures GDM starts automatically when the system boots
Verify the group is fully removed. Search the installed list for any traces. An empty output means the group is gone.
Here's how to confirm the group is removed.
dnf group list installed | grep -i kde
# Search the installed list for any remaining traces
# An empty output means the group is fully removed
# If you see output, run autoremove again or check for partial removals
Reboot to confirm. The login screen should match your remaining desktop. If it doesn't, check the display manager service before blaming the desktop removal.
Common pitfalls and recovery
The biggest risk is removing the only graphical interface. If you have only one desktop environment installed and you remove it, you drop to a TTY. You can still use the system via the terminal. You can reinstall the group from the TTY. Recovery is straightforward if you have network access.
If you see a boot failure related to the display manager, the service is likely orphaned or misconfigured. The journal will show the error.
[FAILED] Failed to start GNOME Display Manager.
See 'systemctl status gdm.service' for details.
This error appears when GDM cannot start. It often happens if you removed GNOME but left GDM enabled, or if you removed a dependency GDM needs. Run journalctl -xeu gdm to see the detailed log. The x flag adds explanatory text. The e flag jumps to the end. The u flag filters by unit. This command gives you the context you need to fix the issue.
If you accidentally removed your only desktop, boot to a TTY. Press Ctrl+Alt+F3 at the login screen. Log in with your username and password. Reinstall the group using dnf.
Here's how to recover from a lockout.
sudo dnf group install "GNOME"
# Reinstall the GNOME group from a TTY or rescue shell
# This restores the desktop environment and its dependencies
# Run this only if you have accidentally removed your only GUI
Another pitfall is manual file deletion. If you used rm to delete desktop files, you broke the package database. dnf cannot track those files. SELinux contexts may be wrong. Package verification will fail. Always use dnf for removal. If you already deleted files manually, run sudo dnf reinstall <package> to restore the files and fix the database.
Snapshot the system before the removal if you can. Future-you will thank you when the transaction list looks too aggressive.
When to use each removal method
Use dnf group remove when you want to cleanly uninstall a full desktop environment and its metapackages.
Use dnf autoremove after every removal to reclaim space from orphaned dependencies.
Use systemctl disable and enable when switching the default display manager to match your remaining desktop.
Use dnf history undo when you made a mistake and want to reverse the transaction without reinstalling.
Use dnf group info when you need to verify what packages a group contains before removing it.
Stay away from rpm -e because it bypasses dependency resolution and can leave the package database in an inconsistent state.