Packages on Fedora, Red Hat Enterprise Linux (RHEL), and CentOS Stream can share libraries and other components. DNF checks those relationships before it removes a package.
A removal can include packages that depend on the one you selected. DNF can also remove automatically installed dependencies that are no longer needed.
Files the software created in your home directory can remain on disk after the package is gone.
Steps to remove a package with DNF:
- Start a removal transaction for the installed package.
In both commands,
treeis the installed package name to replace.–setopt=assumeyes=Falsedisables automatic approval for this run.$ sudo dnf --setopt=assumeyes=False remove tree Package Arch Version Repository Size Removing: tree aarch64 0:2.3.1-2.fc45 fedora 169.1 KiB ##### snipped ##### Is this ok [y/N]:
Approving the transaction removes every package on the removal list. If any listed package should stay installed, type
nto cancel. - Enter
yat the DNF prompt if every listed removal is intended.Is this ok [y/N]: y ##### snipped ##### Complete!
- Confirm that RPM reports the package as not installed.
$ rpm --query tree package tree is not installed
If RPM prints a package version, the package is still installed.