DNF(8) DNF DNF(8) NAME dnf - DNF Command Reference SYNOPSIS dnf [options] [...] DESCRIPTION DNF is the next upcoming major version of YUM, a package manager for RPM-based Linux distributions. It roughly maintains CLI compatibility with YUM and defines a strict API for extensions and plugins. Plugins can modify or extend features of DNF or provide additional CLI commands on top of those mentioned below. If you know the name of such a command (including commands mentioned below), you may find/install the package which provides it using the appropriate virtual provide in the form of dnf-com‐ mand(), where is the name of the command; e.g.``dnf install 'dnf-command(versionlock)'`` installs a versionlock plugin. This approach also applies to specifying dependencies of packages that require a particular DNF command. Return values: · 0 : Operation was successful. · 1 : An error occurred, which was handled by dnf. · 3 : An unknown unhandled error occurred during operation. · 100: See check-update · 200: There was a problem with acquiring or releasing of locks. Available commands: · alias · autoremove · check · check-update · clean · distro-sync · downgrade · group · help · history · info · install · list · makecache · mark · module · provides · reinstall · remove · repoinfo · repolist · repoquery · repository-packages · search · shell · swap · updateinfo · upgrade · upgrade-minimal · upgrade-to Additional information: · Options · Specifying Packages · Specifying Exact Versions of Packages · Specifying Provides · Specifying Groups · Specifying Transactions · Metadata Synchronization · Configuration Files Replacement Policy · Files · See Also OPTIONS -4 Resolve to IPv4 addresses only. -6 Resolve to IPv6 addresses only. --advisory=, --advisories= Include packages corresponding to the advisory ID, Eg. FEDORA-2201-123. Applicable for the install, repoquery, updateinfo and upgrade commands. --allowerasing Allow erasing of installed packages to resolve dependencies. This option could be used as an alternative to the yum swap command where packages to remove are not explicitly defined. --assumeno Automatically answer no for all questions. -b, --best Try the best available package versions in transactions. Specifically during dnf upgrade, which by default skips over updates that can not be installed for dependency reasons, the switch forces DNF to only consider the latest packages. When running into packages with broken dependencies, DNF will fail giving a reason why the latest version can not be installed. --bugfix Include packages that fix a bugfix issue. Applicable for the install, repoquery, updateinfo and upgrade commands. --bz=, --bzs= Include packages that fix a Bugzilla ID, Eg. 123123. Applicable for the install, repoquery, updateinfo and upgrade commands. -C, --cacheonly Run entirely from system cache, don't update the cache and use it even in case it is expired. DNF uses a separate cache for each user under which it executes. The cache for the root user is called the system cache. This switch allows a regular user read-only access to the system cache, which usually is more fresh than the user's and thus he does not have to wait for metadata sync. --color= Control whether color is used in terminal output. Valid values are always, never and auto (default). --comment= Add a comment to the transaction history. -c , --config= Configuration file location. --cve=, --cves= Include packages that fix a CVE (Common Vulnerabilities and Exposures) ID (http://cve.mitre.org/about/), Eg. CVE-2201-0123. Applicable for the install, repoquery, updateinfo, and upgrade commands. -d , --debuglevel= Debugging output level. This is an integer value between 0 (no additional information strings) and 10 (shows all debugging information, even that not understandable to the user), default is 2. Deprecated, use -v instead. --debugsolver Dump data aiding in dependency solver debugging into ./debugdata. --disableexcludes=[all|main|], --disableexcludepkgs=[all|main|] Disable the configuration file excludes. Takes one of the following three options: · all, disables all configuration file excludes · main, disables excludes defined in the [main] section · repoid, disables excludes defined for the given repository --disable, --set-disabled Disable specified repositories (automatically saves). The option has to be used together with the config-manager command (dnf-plugins-core). --disableplugin= Disable the listed plugins specified by names or globs. --disablerepo= Disable specific repositories by an id or a glob. This option is mutually exclusive with --repo. --downloaddir=, --destdir= Redirect downloaded packages to provided directory. The option has to be used together with the --downloadonly command line option, with the download command (dnf-plugins-core) or with the system-upgrade command (dnf-plugins-extras). --downloadonly Download the resolved package set without performing any rpm transaction (install/upgrade/erase). -e , --errorlevel= Error output level. This is an integer value between 0 (no error output) and 10 (shows all error messages), default is 3. Deprecated, use -v instead. --enable, --set-enabled Enable specified repositories (automatically saves). The option has to be used together with the config-manager command (dnf-plugins-core). --enableplugin= Enable the listed plugins specified by names or globs. --enablerepo= Enable additional repositories by an id or a glob. --enhancement Include enhancement relevant packages. Applicable for the install, repoquery, updateinfo and upgrade commands. -x , --exclude= Exclude packages specified by from the operation. --excludepkgs= Deprecated option. It was replaced by the --exclude option. --forcearch= Force the use of an architecture. Any architecture can be specified. However, use of an architecture not supported natively by your CPU will require emulation of some kind. This is usually through QEMU. The behavior of --forcearch can be configured by using the arch and ignorearch configura‐ tion options with values and True respectively. -h, --help, --help-cmd Show the help. --installroot= Specifies an alternative installroot, relative to where all packages will be installed. Think of this like doing chroot dnf, except using --installroot allows dnf to work before the chroot is created. It requires absolute path. · cachedir, log files, releasever, and gpgkey are taken from or stored in the installroot. Gpgkeys are imported into the installroot from a path relative to the host which can be specified in the repository section of configuration files. · configuration file and reposdir are searched inside the installroot first. If they are not present, they are taken from the host system. Note: When a path is specified within a command line argument (--config= in case of configuration file and --setopt=reposdir= for repos‐ dir) then this path is always relative to the host with no exceptions. · The pluginpath and pluginconfpath are relative to the host. Note: You may also want to use the command-line option --releasever= when creating the installroot, otherwise the $releasever value is taken from the rpmdb within the installroot (and thus it is empty at the time of creation and the transaction will fail). If --releasever=/ is used, the releasever will be detected from the host (/) system. The new installroot path at the time of creation does not contain the repository, releasever and dnf.conf files. On a modular system you may also want to use the --setopt=module_platform_id= command-line option when creating the installroot, otherwise the module_platform_id value will be taken from the /etc/os-release file within the installroot (and thus it will be empty at the time of creation, the modular dependency could be unsatisfied and modules content could be excluded). Installroot examples: dnf --installroot= --releasever= install system-release Permanently sets the releasever of the system in the directory to . dnf --installroot= --setopt=reposdir= --config /path/dnf.conf upgrade Upgrades packages inside the installroot from a repository described by --setopt using configuration from /path/dnf.conf. --newpackage Include newpackage relevant packages. Applicable for the install, repoquery, updateinfo and upgrade commands. --noautoremove Disable removal of dependencies that are no longer used. It sets clean_requirements_on_remove configuration option to False. --nobest Set best option to False, so that transactions are not limited to best candidates only. --nodocs Do not install documentation. Sets the rpm flag 'RPMTRANS_FLAG_NODOCS'. --nogpgcheck Skip checking GPG signatures on packages (if RPM policy allows). --noplugins Disable all plugins. --obsoletes This option has an effect on an install/update, it enables dnf's obsoletes processing logic. For more information see the obsoletes option. This option also displays capabilities that the package obsoletes when used togehter with the repoquery command. Configuration Option: obsoletes -q, --quiet In combination with a non-interactive command, shows just the relevant content. Suppresses messages notifying about the current state or actions of DNF. -R , --randomwait= Maximum command wait time. --refresh Set metadata as expired before running the command. --releasever= Configure DNF as if the distribution release was . This can affect cache paths, values in configuration files and mirrorlist URLs. --repofrompath , Specify a path or url to a repository (same path as in a baseurl) to add to the repositories for this query. This option can be used multiple times. The repository label for the repository is specified by . If you want to view only packages from this repository, combine this with the --repo= or --disablerepo="*" switches. The repository label for the repository is specified by . The configuration for the repo could be adjusted using --setopt=.