Glossary

dnf

dnf (Dandified Yum) is the high-level package manager for Fedora, RHEL 8+, CentOS Stream, Rocky, and AlmaLinux. It replaces the older yum with a cleaner Python implementation based on libsolv, providing faster dependency resolution, better transaction management, and a plugin system. The command-line interface is largely compatible with yum, so muscle memory transfers directly.

sudo dnf check-update             # list available upgrades
sudo dnf upgrade                   # apply all upgrades
sudo dnf install nginx             # install
sudo dnf remove nginx              # remove
sudo dnf search keyword
sudo dnf info nginx
sudo dnf provides /usr/bin/python3 # which package provides this?
sudo dnf history                    # view transaction history
sudo dnf history undo last          # roll back a transaction

Repositories are configured under /etc/yum.repos.d/. The transaction history is particularly valuable: dnf records every install/remove/upgrade, and dnf history undo can reverse one, making it easier to recover from a regression. dnf also integrates well with rpm-ostree on Silverblue for image-based updates.

For Red Hat ecosystem servers, dnf is the main interface to software installation, alongside subscription-manager on commercial RHEL. On Fedora workstations it is often the first command a new user learns.

Related terms: rpm, yum, Fedora, Red Hat Enterprise Linux

Discussed in:

Also defined in: Textbook of Linux