dnf(8)
DNF is a package manager for Linux systems that installs, updates, and removes software packages from configured repositories.
Synopsis
dnf [OPTION]... COMMAND [ARGS]...Description
DNF (Dandified Yum) is the default package manager for Fedora, RHEL 8+, and CentOS Stream. It resolves dependencies automatically, manages package repositories, and provides a more efficient alternative to its predecessor Yum with better performance and dependency resolution.
DNF organizes software into packages that can be installed from remote repositories or local sources. It maintains a local cache of package metadata and can perform bulk operations like system upgrades and package removals with automatic dependency handling.
Common options
| Flag | What it does |
|---|---|
install | Install one or more packages by name |
remove | Remove installed packages and their dependents |
upgrade | Upgrade all packages to the latest versions available |
search | Search for packages by name or description |
info | Display detailed information about a package |
-y / --assumeyes | Automatically answer 'yes' to prompts, useful for scripts |
-q / --quiet | Minimize output from the command |
list installed | List all currently installed packages |
clean all | Remove all cached packages and metadata |
check-update | Check for available package updates without installing |
group list | Display available package groups |
--repo=REPO | Operate on a specific repository |
Examples
Install the vim text editor package
sudo dnf install vimUpgrade all installed packages to latest versions
sudo dnf upgradeSearch for packages matching 'nginx' in repositories
dnf search nginxShow detailed information about the python3 package
dnf info python3Remove the httpd (Apache web server) package
sudo dnf remove httpdList all installed packages containing 'python' in the name
dnf list installed | grep pythonCheck which installed packages have available updates
dnf check-updateAutomatically install the development-tools package group
sudo dnf install -y @development-tools