dnf [options] <command> [<args>...]
DNF is an experimental replacement for Yum, a package manager for RPM Linux distributions. It aims to maintain CLI compatibility with Yum while improving on speed and defining strict API and plugin interface.
Available commands are:
See the reference for each command below.
Disable the config file excludes. Takes one of three options:
- all, disables all config file excludes
- main, disables excludes defined in the [main] section
- repoid, disables excludes defined for the given repo
For an explanation of <package-spec> and <package-name-spec> see Specifying Packages.
For an explanation of <package-nevr-spec> see Specifying Exact Versions of Packages.
For an explanation of <provide-spec> see Specifying Provides.
dnf [options] check-update [<package-specs>...]
Non-interactively checks if updates of the specified packages are available. If no <package-specs> are given checks whether any updates at all are available for your system. DNF exit code will be 100 when there are updates available and a list of the updates will be printed, 0 if not and 1 if an error occurs.
Performs cleanup of temporary files for the currently enabled repositories.
The history command allows the user to view what has happened in past transactions (assuming the history_record configuration option is set).
Dumps lists of packages depending on the packages’ relation to the system. Generally packages are available (it is present in a repository we know about) or installed (present in the RPMDB). The list command can also limit the displayed packages according to other criteria, e.g. to only those that update an installed package.
All the forms take a [<package-specs>...] parameter to further limit the result to only those packages matching it.
Many commands take a <package-spec> parameter that selects a package for the operation. DNF looks for interpretations of the parameter from the most commonly used meanings to the least, that is it tries to see if the given spec fits one of the following patterns (in decreasing order of priority):
Note that name can in general contain dashes (e.g. package-subpackage).
Failing to match the input argument to an existing package name based on the patterns above, DNF tries to see if the argument matches an existing provide.
If multiple versions of the selected package exist in the repo, the most recent version suitable for the given operation is used. The name specification is case-sensitive, globbing characters “?, * and [ are allowed and trigger shell-like glob matching.
<package-name-spec> is similar to <package-spec> except the provides matching is never attempted there.
Commands accepting the <package-nevr-spec> parameter need not only the name of the package, but also its version, release and optionally the architecture. Further, the version part can be preceded by an epoch when it is relevant (i.e. the epoch is non-zero).
<provide-spec> in command descriptions means the command operates on packages providing the given spec. This can either be an explicit provide, an implicit provide (i.e. name of the package) or a file provide. The selection is case-sensitive and globbing is supported.