Product SiteDocumentation Site

6.2.5. Removing Packages

Similarly to package installation, DNF allows you to uninstall (remove in RPM and DNF terminology) both individual packages and a package group.

Removing Individual Packages

To uninstall a particular package, as well as any packages that depend on it, run the following command as root:
dnf remove package_name
As when you install multiple packages, you can remove several at once by adding more package names to the command. For example, to remove totem, rhythmbox, and sound-juicer, type the following at a shell prompt:
~]# dnf remove totem rhythmbox sound-juicer
Similar to install, remove can take these arguments:

Removing a package when other packages depend on it

DNF is not able to remove a package without also removing packages which depend on it. This type of operation can only be performed by RPM, is not advised, and can potentially leave your system in a non-functioning state or cause applications to misbehave and terminate unexpectedly. For further information, refer to Section A.2.2, “Uninstalling Packages” in the RPM chapter.

Removing a Package Group

You can remove a package group using syntax congruent with the install syntax:
dnf group remove group
dnf remove @group
The following are alternative but equivalent ways of removing the KDE Plasma Workspaces group:
~]# dnf group remove "KDE Plasma Workspaces"
~]# dnf group remove kde-desktop-environment
~]# dnf remove @kde-desktop-environment