.\" Man page generated from reStructuredText. . .TH "DNF" "8" "Mar 01, 2021" "4.5.2" "DNF" .SH NAME dnf \- DNF Command Reference . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBdnf [options] [...]\fP .SH DESCRIPTION .sp \fI\%DNF\fP is the next upcoming major version of \fI\%YUM\fP, a package manager for RPM\-based Linux distributions. It roughly maintains CLI compatibility with YUM and defines a strict API for extensions and plugins. .sp 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 \fBdnf\-command()\fP, where \fB\fP is the name of the command; e.g.\(ga\(gadnf install \(aqdnf\-command(versionlock)\(aq\(ga\(ga installs a \fBversionlock\fP plugin. This approach also applies to specifying dependencies of packages that require a particular DNF command. .sp Return values: .INDENT 0.0 .IP \(bu 2 \fB0\fP : Operation was successful. .IP \(bu 2 \fB1\fP : An error occurred, which was handled by dnf. .IP \(bu 2 \fB3\fP : An unknown unhandled error occurred during operation. .IP \(bu 2 \fB100\fP: See \fI\%check\-update\fP .IP \(bu 2 \fB200\fP: There was a problem with acquiring or releasing of locks. .UNINDENT .sp Available commands: .INDENT 0.0 .IP \(bu 2 \fI\%alias\fP .IP \(bu 2 \fI\%autoremove\fP .IP \(bu 2 \fI\%check\fP .IP \(bu 2 \fI\%check\-update\fP .IP \(bu 2 \fI\%clean\fP .IP \(bu 2 \fI\%deplist\fP .IP \(bu 2 \fI\%distro\-sync\fP .IP \(bu 2 \fI\%downgrade\fP .IP \(bu 2 \fI\%group\fP .IP \(bu 2 \fI\%help\fP .IP \(bu 2 \fI\%history\fP .IP \(bu 2 \fI\%info\fP .IP \(bu 2 \fI\%install\fP .IP \(bu 2 \fI\%list\fP .IP \(bu 2 \fI\%makecache\fP .IP \(bu 2 \fI\%mark\fP .IP \(bu 2 \fI\%module\fP .IP \(bu 2 \fI\%provides\fP .IP \(bu 2 \fI\%reinstall\fP .IP \(bu 2 \fI\%remove\fP .IP \(bu 2 \fI\%repoinfo\fP .IP \(bu 2 \fI\%repolist\fP .IP \(bu 2 \fI\%repoquery\fP .IP \(bu 2 \fI\%repository\-packages\fP .IP \(bu 2 \fI\%search\fP .IP \(bu 2 \fI\%shell\fP .IP \(bu 2 \fI\%swap\fP .IP \(bu 2 \fI\%updateinfo\fP .IP \(bu 2 \fI\%upgrade\fP .IP \(bu 2 \fI\%upgrade\-minimal\fP .UNINDENT .sp Additional information: .INDENT 0.0 .IP \(bu 2 \fI\%Options\fP .IP \(bu 2 \fI\%Specifying Packages\fP .IP \(bu 2 \fI\%Specifying Provides\fP .IP \(bu 2 \fI\%Specifying Groups\fP .IP \(bu 2 \fI\%Specifying Transactions\fP .IP \(bu 2 \fI\%Metadata Synchronization\fP .IP \(bu 2 \fI\%Configuration Files Replacement Policy\fP .IP \(bu 2 \fI\%Files\fP .IP \(bu 2 \fI\%See Also\fP .UNINDENT .SH OPTIONS .INDENT 0.0 .TP .B \fB\-4\fP Resolve to IPv4 addresses only. .TP .B \fB\-6\fP Resolve to IPv6 addresses only. .TP .B \fB\-\-advisory=, \-\-advisories=\fP Include packages corresponding to the advisory ID, Eg. FEDORA\-2201\-123. Applicable for the install, repoquery, updateinfo and upgrade commands. .TP .B \fB\-\-allowerasing\fP Allow erasing of installed packages to resolve dependencies. This option could be used as an alternative to the \fByum swap\fP command where packages to remove are not explicitly defined. .TP .B \fB\-\-assumeno\fP Automatically answer no for all questions. .TP .B \fB\-b, \-\-best\fP Try the best available package versions in transactions. Specifically during \fI\%dnf upgrade\fP, 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. .TP .B \fB\-\-bugfix\fP Include packages that fix a bugfix issue. Applicable for the install, repoquery, updateinfo and upgrade commands. .TP .B \fB\-\-bz=, \-\-bzs=\fP Include packages that fix a Bugzilla ID, Eg. 123123. Applicable for the install, repoquery, updateinfo and upgrade commands. .TP .B \fB\-C, \-\-cacheonly\fP Run entirely from system cache, don\(aqt update the cache and use it even in case it is expired. .sp 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\(aqs and thus he does not have to wait for metadata sync. .TP .B \fB\-\-color=\fP Control whether color is used in terminal output. Valid values are \fBalways\fP, \fBnever\fP and \fBauto\fP (default). .TP .B \fB\-\-comment=\fP Add a comment to the transaction history. .TP .B \fB\-c , \-\-config=\fP Configuration file location. .TP .B \fB\-\-cve=, \-\-cves=\fP Include packages that fix a CVE (Common Vulnerabilities and Exposures) ID (\fI\%http://cve.mitre.org/about/\fP), Eg. CVE\-2201\-0123. Applicable for the install, repoquery, updateinfo, and upgrade commands. .TP .B \fB\-d , \-\-debuglevel=\fP 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 \fB\-v\fP instead. .TP .B \fB\-\-debugsolver\fP Dump data aiding in dependency solver debugging into \fB\&./debugdata\fP\&. .UNINDENT .sp \fB\-\-disableexcludes=[all|main|], \-\-disableexcludepkgs=[all|main|]\fP .INDENT 0.0 .INDENT 3.5 Disable the configuration file excludes. Takes one of the following three options: .INDENT 0.0 .IP \(bu 2 \fBall\fP, disables all configuration file excludes .IP \(bu 2 \fBmain\fP, disables excludes defined in the \fB[main]\fP section .IP \(bu 2 \fBrepoid\fP, disables excludes defined for the given repository .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fB\-\-disable, \-\-set\-disabled\fP Disable specified repositories (automatically saves). The option has to be used together with the \fBconfig\-manager\fP command (dnf\-plugins\-core). .UNINDENT .INDENT 0.0 .TP .B \fB\-\-disableplugin=\fP Disable the listed plugins specified by names or globs. .TP .B \fB\-\-disablerepo=\fP Disable specific repositories by an id or a glob. This option is mutually exclusive with \fB\-\-repo\fP\&. .TP .B \fB\-\-downloaddir=, \-\-destdir=\fP Redirect downloaded packages to provided directory. The option has to be used together with the \-\fI\%\-downloadonly\fP command line option, with the \fBdownload\fP command (dnf\-plugins\-core) or with the \fBsystem\-upgrade\fP command (dnf\-plugins\-extras). .UNINDENT .INDENT 0.0 .TP .B \fB\-\-downloadonly\fP Download the resolved package set without performing any rpm transaction (install/upgrade/erase). .TP .B \fB\-e , \-\-errorlevel=\fP Error output level. This is an integer value between 0 (no error output) and 10 (shows all error messages), default is 3. Deprecated, use \fB\-v\fP instead. .TP .B \fB\-\-enable, \-\-set\-enabled\fP Enable specified repositories (automatically saves). The option has to be used together with the \fBconfig\-manager\fP command (dnf\-plugins\-core). .TP .B \fB\-\-enableplugin=\fP Enable the listed plugins specified by names or globs. .TP .B \fB\-\-enablerepo=\fP Enable additional repositories by an id or a glob. .TP .B \fB\-\-enhancement\fP Include enhancement relevant packages. Applicable for the install, repoquery, updateinfo and upgrade commands. .UNINDENT .INDENT 0.0 .TP .B \fB\-x , \-\-exclude=\fP Exclude packages specified by \fB\fP from the operation. .TP .B \fB\-\-excludepkgs=\fP Deprecated option. It was replaced by the \-\fI\%\-exclude\fP option. .TP .B \fB\-\-forcearch=\fP 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 \fB\-\-forcearch\fP can be configured by using the arch and ignorearch configuration options with values \fB\fP and \fBTrue\fP respectively. .TP .B \fB\-h, \-\-help, \-\-help\-cmd\fP Show the help. .UNINDENT .INDENT 0.0 .TP .B \fB\-\-installroot=\fP Specifies an alternative installroot, relative to where all packages will be installed. Think of this like doing \fBchroot dnf\fP, except using \fB\-\-installroot\fP allows dnf to work before the chroot is created. It requires absolute path. .UNINDENT .INDENT 0.0 .IP \(bu 2 \fIcachedir\fP, \fIlog files\fP, \fIreleasever\fP, and \fIgpgkey\fP are taken from or stored in the installroot. \fIGpgkeys\fP are imported into the installroot from a path relative to the host which can be specified in the repository section of configuration files. .IP \(bu 2 \fIconfiguration file\fP 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 (\fB\-\-config=\fP in case of \fIconfiguration file\fP and \fB\-\-setopt=reposdir=\fP for \fIreposdir\fP) then this path is always relative to the host with no exceptions. .IP \(bu 2 \fIvars\fP are taken from the host system or installroot according to reposdir \&. When \fIreposdir\fP path is specified within a command line argument, vars are taken from the installroot. When varsdir paths are specified within a command line argument (\fB\-\-setopt=varsdir=\fP) then those path are always relative to the host with no exceptions. .IP \(bu 2 The \fIpluginpath\fP and \fIpluginconfpath\fP are relative to the host. .UNINDENT .INDENT 0.0 .INDENT 3.5 Note: You may also want to use the command\-line option \fB\-\-releasever=\fP when creating the installroot, otherwise the \fI$releasever\fP 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 \fB\-\-releasever=/\fP is used, the releasever will be detected from the host (\fB/\fP) system. The new installroot path at the time of creation does not contain the \fIrepository\fP, \fIreleasever\fP and \fIdnf.conf\fP files. .sp On a modular system you may also want to use the \fB\-\-setopt=module_platform_id=\fP command\-line option when creating the installroot, otherwise the module_platform_id value will be taken from the \fB/etc/os\-release\fP 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). .sp Installroot examples: .INDENT 0.0 .TP .B \fBdnf \-\-installroot= \-\-releasever= install system\-release\fP Permanently sets the \fBreleasever\fP of the system in the \fB\fP directory to \fB\fP\&. .TP .B \fBdnf \-\-installroot= \-\-setopt=reposdir= \-\-config /path/dnf.conf upgrade\fP Upgrades packages inside the installroot from a repository described by \fB\-\-setopt\fP using configuration from \fB/path/dnf.conf\fP\&. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \fB\-\-newpackage\fP Include newpackage relevant packages. Applicable for the install, repoquery, updateinfo and upgrade commands. .TP .B \fB\-\-noautoremove\fP Disable removal of dependencies that are no longer used. It sets clean_requirements_on_remove configuration option to \fBFalse\fP\&. .TP .B \fB\-\-nobest\fP Set best option to \fBFalse\fP, so that transactions are not limited to best candidates only. .TP .B \fB\-\-nodocs\fP Do not install documentation. Sets the rpm flag \(aqRPMTRANS_FLAG_NODOCS\(aq. .TP .B \fB\-\-nogpgcheck\fP Skip checking GPG signatures on packages (if RPM policy allows). .TP .B \fB\-\-noplugins\fP Disable all plugins. .UNINDENT .INDENT 0.0 .TP .B \fB\-\-obsoletes\fP This option has an effect on an install/update, it enables dnf\(aqs obsoletes processing logic. For more information see the obsoletes option. .sp This option also displays capabilities that the package obsoletes when used together with the \fI\%repoquery\fP command. .sp Configuration Option: obsoletes .TP .B \fB\-q, \-\-quiet\fP In combination with a non\-interactive command, shows just the relevant content. Suppresses messages notifying about the current state or actions of DNF. .TP .B \fB\-R , \-\-randomwait=\fP Maximum command wait time. .UNINDENT .INDENT 0.0 .TP .B \fB\-\-refresh\fP Set metadata as expired before running the command. .TP .B \fB\-\-releasever=\fP Configure DNF as if the distribution release was \fB\fP\&. This can affect cache paths, values in configuration files and mirrorlist URLs. .UNINDENT .INDENT 0.0 .TP .B \fB\-\-repofrompath ,\fP Specify a repository to add to the repositories for this query. This option can be used multiple times. .UNINDENT .INDENT 0.0 .IP \(bu 2 The repository label is specified by \fB\fP\&. .IP \(bu 2 The path or url to the repository is specified by \fB\fP\&. It is the same path as a baseurl and can be also enriched by the repo variables\&. .IP \(bu 2 The configuration for the repository can be adjusted using \-\fI\%\-setopt\fP=.