Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   dnf    ( 8 )

справочник команд DNF (DNF Command Reference)

Параметры (Options)

-4     Resolve to IPv4 addresses only.

-6 Resolve to IPv6 addresses only.

--advisory=<advisory>, --advisories=<advisory> 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.

Note that the use of the newest available version is only guaranteed for the packages directly requested (e.g. as a command line arguments), and the solver may use older versions of dependencies to meet their requirements.

--bugfix Include packages that fix a bugfix issue. Applicable for the install, repoquery, updateinfo and upgrade commands.

--bz=<bugzilla>, --bzs=<bugzilla> 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=<color> Control whether color is used in terminal output. Valid values are always, never and auto (default).

--comment=<comment> Add a comment to the transaction history.

-c <config file>, --config=<config file> Configuration file location.

--cve=<cves>, --cves=<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 <debug level>, --debuglevel=<debug level> 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|<repoid>], --disableexcludepkgs=[all|main|<repoid>] 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=<plugin names> Disable the listed plugins specified by names or globs.

--disablerepo=<repoid> Disable specific repositories by an id or a glob. This option is mutually exclusive with --repo.

--downloaddir=<path>, --destdir=<path> 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 <error level>, --errorlevel=<error level> 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=<plugin names> Enable the listed plugins specified by names or globs.

--enablerepo=<repoid> Enable additional repositories by an id or a glob.

--enhancement Include enhancement relevant packages. Applicable for the install, repoquery, updateinfo and upgrade commands.

-x <package-file-spec>, --exclude=<package-file-spec> Exclude packages specified by <package-file-spec> from the operation.

--excludepkgs=<package-file-spec> Deprecated option. It was replaced by the --exclude option.

--forcearch=<arch> 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 configuration options with values <arch> and True respectively.

-h, --help, --help-cmd Show the help.

--installroot=<path> Specifies an alternative installroot, relative to where all packages will be installed. Think of this like doing chroot <root> 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=<config file> in case of configuration file and --setopt=reposdir=<reposdir> for reposdir) then this path is always relative to the host with no exceptions.

vars are taken from the host system or installroot according to reposdir . When reposdir path is specified within a command line argument, vars are taken from the installroot. When varsdir paths are specified within a command line argument (--setopt=varsdir=<reposdir>) then those path are 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=<release> 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=<module_platform_name:stream> 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=<installroot> --releasever=<release> install system-release Permanently sets the releasever of the system in the <installroot> directory to <release>.

dnf --installroot=<installroot> --setopt=reposdir=<path> --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 together 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 <minutes>, --randomwait=<minutes> Maximum command wait time.

--refresh Set metadata as expired before running the command.

--releasever=<release> Configure DNF as if the distribution release was <release>. This can affect cache paths, values in configuration files and mirrorlist URLs.

--repofrompath <repo>,<path/url> Specify a repository to add to the repositories for this query. This option can be used multiple times.

• The repository label is specified by <repo>.

• The path or url to the repository is specified by <path/url>. It is the same path as a baseurl and can be also enriched by the repo variables.

• The configuration for the repository can be adjusted using -‐ -setopt=<repo>.<option>=<value>.

• If you want to view only packages from this repository, combine this with the --repo=<repo> or --disablerepo="*" switches.

--repo=<repoid>, --repoid=<repoid> Enable just specific repositories by an id or a glob. Can be used multiple times with accumulative effect. It is basically a shortcut for --disablerepo="*" --enablerepo=<repoid> and is mutually exclusive with the --disablerepo option.

--rpmverbosity=<name> RPM debug scriptlet output level. Sets the debug level to <name> for RPM scriptlets. For available levels, see the rpmverbosity configuration option.

--sec-severity=<severity>, --secseverity=<severity> Includes packages that provide a fix for an issue of the specified severity. Applicable for the install, repoquery, updateinfo and upgrade commands.

--security Includes packages that provide a fix for a security issue. Applicable for the upgrade command.

--setopt=<option>=<value> Override a configuration option from the configuration file. To override configuration options for repositories, use repoid.option for the <option>. Values for configuration options like excludepkgs, includepkgs, installonlypkgs and tsflags are appended to the original value, they do not override it. However, specifying an empty value (e.g. --setopt=tsflags=) will clear the option.

--skip-broken Resolve depsolve problems by removing packages that are causing problems from the transaction. It is an alias for the strict configuration option with value False. Additionally, with the enable and disable module subcommands it allows one to perform an action even in case of broken modular dependencies.

--showduplicates Show duplicate packages in repositories. Applicable for the list and search commands.

-v, --verbose Verbose operation, show debug messages.

--version Show DNF version and exit.

-y, --assumeyes Automatically answer yes for all questions.

List options are comma-separated. Command-line options override respective settings from configuration files.