neulab/tldr huggingface dataset:
dnf install vim DNF will automatically recognize that vim is not a package name, but will look up and install a package that provides vim with all the required dependencies. Note: Package name match has precedence over package provides match.
dnf install https://kojipkgs.fedoraproject.org//packages/tito/0.6.0/1.fc22/noarch/tito-0.6.0-1.fc22.noarch.rpm Install a package directly from a URL.
dnf install '@docker' Install all default profiles of module 'docker' and their RPMs. Module streams get enabled accordingly.
dnf install '@Web Server' Install the 'Web Server' environmental group.
dnf install /usr/bin/rpmsign Install a package that provides the /usr/bin/rpmsign file.
dnf -y install tito --setopt=install_weak_deps=False Install the tito package (tito is the package name) without weak deps. Weak deps are not required for core functionality of the package, but they enhance the original package (like extended documentation, plugins, additional functions, etc.).
dnf install --advisory=FEDORA-2018-b7b99fe852 \* Install all packages that belong to the "FEDORA-2018-b7b99fe852" advisory.
List Command Command: list Aliases: ls
Prints lists of packages depending on the packages' relation to the system. A package is installed if it is present in the RPMDB, and it is available if it is not installed but is present in a repository that DNF knows about.
The list command also limits the displayed packages according to specific criteria, e.g. to only those that update an installed package (respecting the repository priority). The exclude option in the configuration file can influence the result, but if the --disableexcludes command line option is used, it ensures that all installed packages will be listed.
dnf [options] list [--all] [<package-file-spec>...] Lists all packages, present in the RPMDB, in a repository or both.
dnf [options] list --installed [<package-file-spec>...] Lists installed packages.
dnf [options] list --available [<package-file-spec>...] Lists available packages.
dnf [options] list --extras [<package-file-spec>...] Lists extras, that is packages installed on the system that are not available in any known repository.
dnf [options] list --obsoletes [<package-file-spec>...] List packages installed on the system that are obsoleted by packages in any known repository.
dnf [options] list --recent [<package-file-spec>...] List packages recently added into the repositories.
dnf [options] list --upgrades [<package-file-spec>...] List upgrades available for the installed packages.
dnf [options] list --autoremove List packages which will be removed by the dnf autoremove command.
Makecache Command Command: makecache Aliases: mc
dnf [options] makecache Downloads and caches metadata for enabled repositories. Tries to avoid downloading whenever possible (e.g. when the local metadata hasn't expired yet or when the metadata timestamp hasn't changed).
dnf [options] makecache --timer Like plain makecache, but instructs DNF to be more resource-aware, meaning it will not do anything if running on battery power and will terminate immediately if it's too soon after the last successful makecache run (see dnf.conf(5), metadata_timer_sync).
Mark Command Command: mark
dnf mark install <package-spec>... Marks the specified packages as installed by user. This can be useful if any package was installed as a dependency and is desired to stay on the system when Autoremove Command or Remove Command along with clean_requirements_on_remove configuration option set to True is executed.
dnf mark remove <package-spec>... Unmarks the specified packages as installed by user. Whenever you as a user don't need a specific package you can mark it for removal. The package stays installed on the system but will be removed when Autoremove Command or Remove Command along with clean_requirements_on_remove configuration option set to True is executed. You should use this operation instead of Remove Command if you're not sure whether the package is a requirement of other user installed packages on the system.
dnf mark group <package-spec>... Marks the specified packages as installed by group. This can be useful if any package was installed as a dependency or a user and is desired to be protected and handled as a group member like during group remove.
Module Command Command: module
Modularity overview is available at man page dnf.modularity(7).  Module subcommands take <module-spec>... arguments that specify modules or profiles.
dnf [options] module install <module-spec>... Install module profiles, including their packages.  In case no profile was provided, all default profiles get installed.  Module streams get enabled accordingly.
This command cannot be used for switching module streams. Use the dnf module switch-to command for that.
dnf [options] module update <module-spec>... Update packages associated with an active module stream, optionally restricted to a profile.  If the profile_name is provided, only the packages referenced by that profile will be updated.
dnf [options] module switch-to <module-spec>... Switch to or enable a module stream, change versions of installed packages to versions provided by the new stream, and remove packages from the old stream that are no longer available. It also updates installed profiles if they are available for the new stream. When a profile was provided, it installs that profile and does not update any already installed profiles.
This command can be used as a stronger version of the dnf module enable command, which not only enables modules, but also does a distrosync to all modular packages in the enabled modules.
It can also be used as a stronger version of the dnf module install command, but it requires to specify profiles that are supposed to be installed, because switch-to command does not use default profiles. The switch-to command doesn't only install profiles, it also makes a distrosync to all modular packages in the installed module.
dnf [options] module remove <module-spec>... Remove installed module profiles, including packages that were installed with the dnf module install command. Will not remove packages required by other installed module profiles or by other user-installed packages.  In case no profile was provided, all installed profiles get removed.
dnf [options] module remove --all <module-spec>... Remove installed module profiles, including packages that were installed with the dnf module install command.  With --all option it additionally removes all packages whose names are provided by specified modules. Packages required by other installed module profiles and packages whose names are also provided by any other module are not removed.
dnf [options] module enable <module-spec>... Enable a module stream and make the stream RPMs available in the package set.
Modular dependencies are resolved, dependencies checked and also recursively enabled. In case of modular dependency issue the operation will be rejected. To perform the action anyway please use --skip-broken option.
dnf [options] module disable <module-name>... Disable a module. All related module streams will become unavailable.  Consequently, all installed profiles will be removed and the module RPMs will become unavailable in the package set. In case of modular dependency issue the operation will be rejected. To perform the action anyway please use --skip-broken option.
dnf [options] module reset <module-name>... Reset module state so it's no longer enabled or disabled. Consequently, all installed profiles will be removed and only RPMs from the default stream will be available in the package set.
dnf [options] module provides <package-name-spec>... Lists all modular packages matching <package-name-spec> from all modules (including disabled), along with the modules and streams they belong to.
dnf [options] module list [--all] [module_name...] Lists all module streams, their profiles and states (enabled, disabled, default).
dnf [options] module list --enabled [module_name...] Lists module streams that are enabled.
dnf [options] module list --disabled [module_name...] Lists module streams that are disabled.
dnf [options] module list --installed [module_name...] List module streams with installed profiles.
dnf [options] module info <module-spec>... Print detailed information about given module stream.
dnf [options] module info --profile <module-spec>... Print detailed information about given module profiles.
dnf [options] module repoquery <module-spec>... List all available packages belonging to selected modules.
dnf [options] module repoquery --available <module-spec>... List all available packages belonging to selected modules.
dnf [options] module repoquery --installed <module-spec>... List all installed packages with same name like packages belonging to selected modules.
Provides Command Command: provides Aliases: prov, whatprovides, wp
dnf [options] provides <provide-spec> Finds the packages providing the given <provide-spec>. This is useful when one knows a filename and wants to find what package (installed or not) provides this file.  The <provide-spec> is gradually looked for at following locations:
1. The <provide-spec> is matched with all file provides of any available package:
$ dnf provides /usr/bin/gzip gzip-1.9-9.fc29.x86_64 : The GNU data compression program Matched from: Filename    : /usr/bin/gzip
2. Then all provides of all available packages are searched:
$ dnf provides "gzip(x86-64)" gzip-1.9-9.fc29.x86_64 : The GNU data compression program Matched from: Provide     : gzip(x86-64) = 1.9-9.fc29
3. DNF assumes that the <provide-spec> is a system command, prepends it with /usr/bin/, /usr/sbin/ prefixes (one at a time) and does the file provides search again. For legacy reasons (packages that didn't do UsrMove) also /bin and /sbin prefixes are being searched:
$ dnf provides zless gzip-1.9-9.fc29.x86_64 : The GNU data compression program Matched from: Filename    : /usr/bin/zless
4. If this last step also fails, DNF returns "Error: No Matches found".
Reinstall Command Command: reinstall Aliases: rei
dnf [options] reinstall <package-spec>... Installs the specified packages, fails if some of the packages are either not installed or not available (i.e. there is no repository where to download the same RPM).
Remove Command Command: remove Aliases: rm Aliases for explicit NEVRA matching: remove-n, remove-na, remove-nevra Deprecated aliases: erase, erase-n, erase-na, erase-nevra
dnf [options] remove <package-spec>... Removes the specified packages from the system along with any packages depending on the packages being removed. Each <spec> can be either a <package-spec>, which specifies a package directly, or a @<group-spec>, which specifies an (environment) group which contains it. If clean_requirements_on_remove is enabled (the default), also removes any dependencies that are no longer needed.
dnf [options] remove --duplicates Removes older versions of duplicate packages. To ensure the integrity of the system it reinstalls the newest package. In some cases the command cannot resolve conflicts. In such cases the dnf shell command with remove --duplicates and upgrade dnf-shell sub-commands could help.
dnf [options] remove --oldinstallonly Removes old installonly packages, keeping only latest versions and version of running kernel.
There are also a few specific remove commands remove-n, remove-na and remove-nevra that allow the specification of an exact argument in the NEVRA format.
Remove Examples dnf remove acpi tito Remove the acpi and tito packages.
dnf remove $(dnf repoquery --extras --exclude=tito,acpi) Remove packages not present in any repository, but don't remove the tito and acpi packages (they still might be removed if they depend on some of the removed packages).
Remove older versions of duplicated packages (an equivalent of yum's package-cleanup --cleandups):
dnf remove --duplicates
Repoinfo Command Command: repoinfo
An alias for the repolist command that provides more detailed information like dnf repolist -v.
Repolist Command Command: repolist
dnf [options] repolist [--enabled|--disabled|--all] Depending on the exact command lists enabled, disabled or all known repositories. Lists all enabled repositories by default. Provides more detailed information when -v option is used.
Repoquery Command Command: repoquery Aliases: rq Aliases for explicit NEVRA matching: repoquery-n, repoquery-na, repoquery-nevra
dnf [options] repoquery [<select-options>] [<query-options>] [<package-file-spec>] Searches available DNF repositories for selected packages and displays the requested information about them. It is an equivalent of rpm -q for remote repositories.
dnf [options] repoquery --groupmember <package-spec>... List groups that contain <package-spec>.
dnf [options] repoquery --querytags Provides the list of tags recognized by the --queryformat repoquery option.
There are also a few specific repoquery commands repoquery-n, repoquery-na and repoquery-nevra that allow the specification of an exact argument in the NEVRA format (does not affect arguments of options like --whatprovides <arg>, ...).
Select Options Together with <package-file-spec>, control what packages are displayed in the output. If <package-file-spec> is given, limits the resulting set of packages to those matching the specification. All packages are considered if no <package-file-spec> is specified.
<package-file-spec> Package specification in the NEVRA format (name[-[epoch:]version[-release]][.arch]), a package provide or a file provide. See Specifying Packages.
-a, --all Query all packages (for rpmquery compatibility, also a shorthand for repoquery '*' or repoquery without arguments).
--arch <arch>[,<arch>...], --archlist <arch>[,<arch>...] Limit the resulting set only to packages of selected architectures (default is all architectures). In some cases the result is affected by the basearch of the running system, therefore to run repoquery for an arch incompatible with your system use the --forcearch=<arch> option to change the basearch.
--duplicates Limit the resulting set to installed duplicate packages (i.e. more package versions for the same name and architecture). Installonly packages are excluded from this set.
--unneeded Limit the resulting set to leaves packages that were installed as dependencies so they are no longer needed. This switch lists packages that are going to be removed after executing the dnf autoremove command.
--available Limit the resulting set to available packages only (set by default).
--disable-modular-filtering Disables filtering of modular packages, so that packages of inactive module streams are included in the result.
--extras Limit the resulting set to packages that are not present in any of the available repositories.
-f <file>, --file <file> Limit the resulting set only to the package that owns <file>.
--installed Limit the resulting set to installed packages only. The exclude option in the configuration file might influence the result, but if the command line option  --disableexcludes is used, it ensures that all installed packages will be listed.
--installonly Limit the resulting set to installed installonly packages.
--latest-limit <number> Limit the resulting set to <number> of latest packages for every package name and architecture.  If <number> is negative, skip <number> of latest packages. For a negative <number> use the --latest-limit=<number> syntax.
--recent Limit the resulting set to packages that were recently edited.
--repo <repoid> Limit the resulting set only to packages from a repository identified by <repoid>.  Can be used multiple times with accumulative effect.
--unsatisfied Report unsatisfied dependencies among installed packages (i.e. missing requires and and existing conflicts).
--upgrades Limit the resulting set to packages that provide an upgrade for some already installed package.
--userinstalled Limit the resulting set to packages installed by the user. The exclude option in the configuration file might influence the result, but if the command line option  --disableexcludes is used, it ensures that all installed packages will be listed.
--whatdepends <capability>[,<capability>...] Limit the resulting set only to packages that require, enhance, recommend, suggest or supplement any of <capabilities>.
--whatconflicts <capability>[,<capability>...] Limit the resulting set only to packages that conflict with any of <capabilities>.
--whatenhances <capability>[,<capability>...] Limit the resulting set only to packages that enhance any of <capabilities>. Use --whatdepends if you want to list all depending packages.
--whatobsoletes <capability>[,<capability>...] Limit the resulting set only to packages that obsolete any of <capabilities>.
--whatprovides <capability>[,<capability>...] Limit the resulting set only to packages that provide any of <capabilities>.
--whatrecommends <capability>[,<capability>...] Limit the resulting set only to packages that recommend any of <capabilities>. Use --whatdepends if you want to list all depending packages.
--whatrequires <capability>[,<capability>...] Limit the resulting set only to packages that require any of <capabilities>. Use --whatdepends if you want to list all depending packages.
--whatsuggests <capability>[,<capability>...] Limit the resulting set only to packages that suggest any of <capabilities>. Use --whatdepends if you want to list all depending packages.
--whatsupplements <capability>[,<capability>...] Limit the resulting set only to packages that supplement any of <capabilities>. Use --whatdepends if you want to list all depending packages.
--alldeps This option is stackable with --whatrequires or --whatdepends only. Additionally it adds all packages requiring the package features to the result set (used as default).
--exactdeps This option is stackable with --whatrequires or --whatdepends only. Limit the resulting set only to packages that require <capability> specified by --whatrequires.
--srpm Operate on the corresponding source RPM.
Query Options Set what information is displayed about each package.
The following are mutually exclusive, i.e. at most one can be specified. If no query option is given, matching packages are displayed in the standard NEVRA notation.
-i, --info Show detailed information about the package.
-l, --list Show the list of files in the package.
-s, --source Show the package source RPM name.
--changelogs Print the package changelogs.
--conflicts Display capabilities that the package conflicts with. Same as --qf "%{conflicts}.
--depends Display capabilities that the package depends on, enhances, recommends, suggests or supplements.
--enhances Display capabilities enhanced by the package. Same as --qf "%{enhances}"".
--location Show a location where the package could be downloaded from.
--obsoletes Display capabilities that the package obsoletes. Same as --qf "%{obsoletes}".
--provides Display capabilities provided by the package. Same as --qf "%{provides}".
--recommends Display capabilities recommended by the package. Same as --qf "%{recommends}".
--requires Display capabilities that the package depends on. Same as --qf "%{requires}".
--requires-pre Display capabilities that the package depends on for running a %pre script.  Same as --qf "%{requires-pre}".
--suggests Display capabilities suggested by the package. Same as --qf "%{suggests}".
--supplements Display capabilities supplemented by the package. Same as --qf "%{supplements}".
--tree Display a recursive tree of packages with capabilities specified by one of the following supplementary options: --whatrequires, --requires, --conflicts, --enhances, --suggests, --provides, --supplements, --recommends.
--deplist Produce a list of all direct dependencies and what packages provide those dependencies for the given packages. The result only shows the newest providers (which can be changed by using --verbose).
--nvr  Show found packages in the name-version-release format. Same as --qf "%{name}-%{version}-%{release}".
--nevra Show found packages in the name-epoch:version-release.architecture format. Same as --qf "%{name}-%{epoch}:%{version}-%{release}.%{arch}" (default).
--envra Show found packages in the epoch:name-version-release.architecture format. Same as --qf "%{epoch}:%{name}-%{version}-%{release}.%{arch}"
--qf <format>, --queryformat <format> Custom display format. <format> is the string to output for each matched package. Every occurrence of %{<tag>} within is replaced by the corresponding attribute of the package. The list of recognized tags can be displayed by running dnf repoquery --querytags.
--recursive Query packages recursively. Has to be used with --whatrequires <REQ> (optionally with --alldeps, but not with --exactdeps) or with --requires <REQ> --resolve.
--resolve resolve capabilities to originating package(s).
Examples Display NEVRAs of all available packages matching light*:
dnf repoquery 'light*'
Display NEVRAs of all available packages matching name light* and architecture noarch (accepts only arguments in the "<name>.<arch>" format):
dnf repoquery-na 'light*.noarch'
Display requires of all lighttpd packages:
dnf repoquery --requires lighttpd
Display packages providing the requires of python packages:
dnf repoquery --requires python --resolve
Display source rpm of ligttpd package:
dnf repoquery --source lighttpd
Display package name that owns the given file:
dnf repoquery --file /etc/lighttpd/lighttpd.conf
Display name, architecture and the containing repository of all lighttpd packages:
dnf repoquery --queryformat '%{name}.%{arch} : %{reponame}' lighttpd
Display all available packages providing "webserver":
dnf repoquery --whatprovides webserver
Display all available packages providing "webserver" but only for "i686" architecture:
dnf repoquery --whatprovides webserver --arch i686
Display duplicate packages:
dnf repoquery --duplicates
Display source packages that require a <provide> for a build:
dnf repoquery --disablerepo="*" --enablerepo="*-source" --arch=src --whatrequires <provide>
Repository-Packages Command Command: repository-packages Deprecated aliases: repo-pkgs, repo-packages, repository-pkgs
The repository-packages command allows the user to run commands on top of all packages in the repository named <repoid>. However, any dependency resolution takes into account packages from all enabled repositories. The <package-file-spec> and <package-spec> specifications further limit the candidates to only those packages matching at least one of them.
The info subcommand lists description and summary information about packages depending on the packages' relation to the repository. The list subcommand just prints lists of those packages.
dnf [options] repository-packages <repoid> check-update [<package-file-spec>...] Non-interactively checks if updates of the specified packages in the repository are available. DNF exit code will be 100 when there are updates available and a list of the updates will be printed.
dnf [options] repository-packages <repoid> info [--all] [<package-file-spec>...] List all related packages.
dnf [options] repository-packages <repoid> info --installed [<package-file-spec>...] List packages installed from the repository.
dnf [options] repository-packages <repoid> info --available [<package-file-spec>...] List packages available in the repository but not currently installed on the system.
dnf [options] repository-packages <repoid> info --extras [<package-file-specs>...] List packages installed from the repository that are not available in any repository.
dnf [options] repository-packages <repoid> info --obsoletes [<package-file-spec>...] List packages in the repository that obsolete packages installed on the system.
dnf [options] repository-packages <repoid> info --recent [<package-file-spec>...] List packages recently added into the repository.
dnf [options] repository-packages <repoid> info --upgrades [<package-file-spec>...] List packages in the repository that upgrade packages installed on the system.
dnf [options] repository-packages <repoid> install [<package-spec>...] Install packages matching <package-spec> from the repository. If <package-spec> isn't specified at all, install all packages from the repository.
dnf [options] repository-packages <repoid> list [--all] [<package-file-spec>...] List all related packages.
dnf [options] repository-packages <repoid> list --installed [<package-file-spec>...] List packages installed from the repository.
dnf [options] repository-packages <repoid> list --available [<package-file-spec>...] List packages available in the repository but not currently installed on the system.
dnf [options] repository-packages <repoid> list --extras [<package-file-spec>...] List packages installed from the repository that are not available in any repository.
dnf [options] repository-packages <repoid> list --obsoletes [<package-file-spec>...] List packages in the repository that obsolete packages installed on the system.
dnf [options] repository-packages <repoid> list --recent [<package-file-spec>...] List packages recently added into the repository.
dnf [options] repository-packages <repoid> list --upgrades [<package-file-spec>...] List packages in the repository that upgrade packages installed on the system.
dnf [options] repository-packages <repoid> move-to [<package-spec>...] Reinstall all those packages that are available in the repository.
dnf [options] repository-packages <repoid> reinstall [<package-spec>...] Run the reinstall-old subcommand. If it fails, run the move-to subcommand.
dnf [options] repository-packages <repoid> reinstall-old [<package-spec>...] Reinstall all those packages that were installed from the repository and simultaneously are available in the repository.
dnf [options] repository-packages <repoid> remove [<package-spec>...] Remove all packages installed from the repository along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed.
dnf [options] repository-packages <repoid> remove-or-distro-sync [<package-spec>...] Select all packages installed from the repository. Upgrade, downgrade or keep those of them that are available in another repository to match the latest version available there and remove the others along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed.
dnf [options] repository-packages <repoid> remove-or-reinstall [<package-spec>...] Select all packages installed from the repository. Reinstall those of them that are available in another repository and remove the others along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) also removes any dependencies that are no longer needed.
dnf [options] repository-packages <repoid> upgrade [<package-spec>...] Update all packages to the highest resolvable version available in the repository.  When versions are specified in the <package-spec>, update to these versions.
dnf [options] repository-packages <repoid> upgrade-to [<package-specs>...] A deprecated alias for the upgrade subcommand.
Search Command Command: search Aliases: se
dnf [options] search [--all] <keywords>... Search package metadata for keywords. Keywords are matched as case-insensitive substrings, globbing is supported.  By default lists packages that match all requested keys (AND operation). Keys are searched in package names and summaries.  If the "--all" option is used, lists packages that match at least one of the keys (an OR operation).  In addition the keys are searched in the package descriptions and URLs.  The result is sorted from the most relevant results to the least.
Shell Command Command: shell Aliases: sh
dnf [options] shell [filename] Open an interactive shell for conducting multiple commands during a single execution of DNF. These commands can be issued manually or passed to DNF from a file. The commands are much the same as the normal DNF command line options. There are a few additional commands documented below.
config [conf-option] [value]
• Set a configuration option to a requested value. If no value is given it prints the current value.
repo [list|enable|disable] [repo-id]
• list: list repositories and their status
• enable: enable repository
• disable: disable repository
transaction [list|reset|solve|run]
• list: resolve and list the content of the transaction
• reset: reset the transaction
• run: resolve and run the transaction
Note that all local packages must be used in the first shell transaction subcommand (e.g.  install /tmp/nodejs-1-1.x86_64.rpm /tmp/acpi-1-1.noarch.rpm) otherwise an error will occur.  Any disable, enable, and reset module operations (e.g. module enable nodejs) must also be performed before any other shell transaction subcommand is used.
Swap Command Command: swap
dnf [options] swap <remove-spec> <install-spec> Remove spec and install spec in one transaction. Each <spec> can be either a <package-spec>, which specifies a package directly, or a @<group-spec>, which specifies an (environment) group which contains it. Automatic conflict solving is provided in DNF by the --allowerasing option that provides the functionality of the swap command automatically.
Updateinfo Command Command: updateinfo Aliases: upif Deprecated aliases: list-updateinfo, list-security, list-sec, info-updateinfo, info-security, info-sec, summary-updateinfo
dnf [options] updateinfo [--summary|--list|--info] [<availability>] [<spec>...] Display information about update advisories.
Depending on the output type, DNF displays just counts of advisory types (omitted or --summary), list of advisories (--list) or detailed information (--info). The -v option extends the output. When used with --info, the information is even more detailed. When used with --list, an additional column with date of the last advisory update is added.
<availability> specifies whether advisories about newer versions of installed packages (omitted or --available), advisories about equal and older versions of installed packages (--installed), advisories about newer versions of those installed packages for which a newer version is available (--updates) or advisories about any versions of installed packages (--all) are taken into account. Most of the time, --available and --updates displays the same output. The outputs differ only in the cases when an advisory refers to a newer version but there is no enabled repository which contains any newer version.
Note, that --available takes only the latest installed versions of packages into account. In case of the kernel packages (when multiple version could be installed simultaneously) also packages of the currently running version of kernel are added.
To print only advisories referencing a CVE or a bugzilla use --with-cve or --with-bz options. When these switches are used also the output of the --list is altered - the ID of the CVE or the bugzilla is printed instead of the one of the advisory.
If given and if neither ID, type (bugfix, enhancement, security/sec) nor a package name of an advisory matches <spec>, the advisory is not taken into account. The matching is case-sensitive and in the case of advisory IDs and package names, globbing is supported.
Output of the --summary option is affected by the autocheck_running_kernel configuration option.
Upgrade Command Command: upgrade Aliases: up Deprecated aliases: update, upgrade-to, update-to, localupdate
dnf [options] upgrade Updates each package to the latest version that is both available and resolvable.
dnf [options] upgrade <package-spec>... Updates each specified package to the latest available version. Updates dependencies as necessary. When versions are specified in the <package-spec>, update to these versions.
dnf [options] upgrade @<spec>... Alias for the dnf module update command.
If the main obsoletes configure option is true or the --obsoletes flag is present, dnf will include package obsoletes in its calculations.  For more information see obsoletes.
Upgrade-Minimal Command Command: upgrade-minimal Aliases: up-min Deprecated aliases: update-minimal
dnf [options] upgrade-minimal Updates each package to the latest available version that provides a bugfix, enhancement or a fix for a security issue (security).
dnf [options] upgrade-minimal <package-spec>... Updates each specified package to the latest available version that provides a bugfix, enhancement or a fix for security issue (security). Updates dependencies as necessary.
Many commands take a <package-spec> parameter that selects a package for the operation. The <package-spec> argument is matched against package NEVRAs, provides and file provides.
<package-file-spec> is similar to <package-spec>, except provides matching is not performed. Therefore, <package-file-spec> is matched only against NEVRAs and file provides.
<package-name-spec> is matched against NEVRAs only.
Globs Package specification supports the same glob pattern matching that shell does, in all three above mentioned packages it matches against (NEVRAs, provides and file provides).
The following patterns are supported:
*      Matches any number of characters.
?      Matches any single character.
[]     Matches any one of the enclosed characters. A pair of characters separated by a hyphen denotes a range expression; any character that falls between those two characters, inclusive, is matched. If the first character following the [ is a ! or a ^ then any character not enclosed is matched.
Note: Curly brackets ({}) are not supported. You can still use them in shells that support them and let the shell do the expansion, but if quoted or escaped, dnf will not expand them.
NEVRA Matching When matching against NEVRAs, partial matching is supported. DNF tries to match the spec against the following list of NEVRA forms (in decreasing order of priority):
• name-[epoch:]version-release.arch
• name.arch
• name-[epoch:]version-release
• name-[epoch:]version
Note that name can in general contain dashes (e.g. package-with-dashes).
The first form that matches any packages is used and the remaining forms are not tried. If none of the forms match any packages, an attempt is made to match the <package-spec> against full package NEVRAs. This is only relevant if globs are present in the <package-spec>.
<package-spec> matches NEVRAs the same way <package-name-spec> does, but in case matching NEVRAs fails, it attempts to match against provides and file provides of packages as well.
You can specify globs as part of any of the five NEVRA components. You can also specify a glob pattern to match over multiple NEVRA components (in other words, to match across the NEVRA separators). In that case, however, you need to write the spec to match against full package NEVRAs, as it is not possible to split such spec into NEVRA forms.
Specifying NEVRA Matching Explicitly Some commands (autoremove, install, remove and repoquery) also have aliases with suffixes -n, -na and -nevra that allow to explicitly specify how to parse the arguments:
• Command install-n only matches against name.
• Command install-na only matches against name.arch.
• Command install-nevra only matches against name-[epoch:]version-release.arch.
<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.
Specifying File Provides If a spec starts with either / or */, it is considered as a potential file provide.
<group-spec> allows one to select (environment) groups a particular operation should work on. It is a case insensitive string (supporting globbing characters) that is matched against a group's ID, canonical name and name translated into the current LC_MESSAGES locale (if possible).
<module-spec> allows one to select modules or profiles a particular operation should work on.
It is in the form of NAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE and supported partial forms are the following:
• NAME
• NAME:STREAM
• NAME:STREAM:VERSION
• NAME:STREAM:VERSION:CONTEXT
• all above combinations with ::ARCH (e.g. NAME::ARCH)
• NAME:STREAM:VERSION:CONTEXT:ARCH
• all above combinations with /PROFILE (e.g. NAME/PROFILE)
In case stream is not specified, the enabled or the default stream is used, in this order. In case profile is not specified, the system default profile or the 'default' profile is used.
<transaction-spec> can be in one of several forms. If it is an integer, it specifies a transaction ID. Specifying last is the same as specifying the ID of the most recent transaction. The last form is last-<offset>, where <offset> is a positive integer. It specifies offset-th transaction preceding the most recent transaction.
Package filtering filters packages out from the available package set, making them invisible to most of dnf commands. They cannot be used in a transaction. Packages can be filtered out by either Exclude Filtering or Modular Filtering.
Exclude Filtering Exclude Filtering is a mechanism used by a user or by a DNF plugin to modify the set of available packages. Exclude Filtering can be modified by either includepkgs or excludepkgs configuration options in configuration files. The --disableexcludes command line option can be used to override excludes from configuration files. In addition to user-configured excludes, plugins can also extend the set of excluded packages. To disable excludes from a DNF plugin you can use the -‐ -disableplugin command line option.
To disable all excludes for e.g. the install command you can use the following combination of command line options:
dnf --disableexcludes=all --disableplugin="*" install bash
Modular Filtering Please see the modularity documentation for details on how Modular Filtering works.
With modularity, only RPM packages from active module streams are included in the available package set. RPM packages from inactive module streams, as well as non-modular packages with the same name or provides as a package from an active module stream, are filtered out. Modular filtering is not applied to packages added from the command line, installed packages, or packages from repositories with module_hotfixes=true in their .repo file.
Disabling of modular filtering is not recommended, because it could cause the system to get into a broken state. To disable modular filtering for a particular repository, specify module_hotfixes=true in the .repo file or use --setopt=<repo_id>.module_hotfixes=true.
To discover the module which contains an excluded package use dnf module provides.
Correct operation of DNF depends on having access to up-to-date data from all enabled repositories but contacting remote mirrors on every operation considerably slows it down and costs bandwidth for both the client and the repository provider. The metadata_expire (see dnf.conf(5)) repository configuration option is used by DNF to determine whether a particular local copy of repository data is due to be re-synced. It is crucial that the repository providers set the option well, namely to a value where it is guaranteed that if particular metadata was available in time T on the server, then all packages it references will still be available for download from the server in time T + metadata_expire.
To further reduce the bandwidth load, some of the commands where having up-to-date metadata is not critical (e.g. the list command) do not look at whether a repository is expired and whenever any version of it is locally available to the user's account, it will be used. For non-root use, see also the --cacheonly switch. Note that in all situations the user can force synchronization of all enabled repositories with the --refresh switch.
The updated packages could replace the old modified configuration files with the new ones or keep the older files. Neither of the files are actually replaced.  To the conflicting ones RPM gives additional suffix to the origin name. Which file should maintain the true name after transaction is not controlled by package manager but is specified by each package itself, following packaging guideline.
Cache Files /var/cache/dnf
Main Configuration /etc/dnf/dnf.conf
Repository /etc/yum.repos.d/
• dnf.conf(5), DNF Configuration Reference
• dnf-PLUGIN(8) for documentation on DNF plugins.
• dnf.modularity(7), Modularity overview.
• dnf-transaction-json(5), Stored Transaction JSON Format Specification.
• DNF project homepage (https://github.com/rpm-software-management/dnf/)
• How to report a bug (‐ https://github.com/rpm-software-management/dnf/wiki/Bug-Reporting)
• YUM project homepage (http://yum.baseurl.org/)
See AUTHORS in DNF source distribution.
2012-2021, Red Hat, Licensed under GPLv2+
WG-QUICK(8)                         WireGuard                        WG-QUICK(8)
wg-quick - set up a WireGuard interface simply
wg-quick [ up | down | save | strip ] [ CONFIG_FILE | INTERFACE ]
This is an extremely simple script for easily bringing up a WireGuard interface, suitable for a few common use cases.
Use up to add and set up an interface, and use down to tear down and remove an interface. Running up adds a WireGuard interface, brings up the interface with the supplied IP addresses, sets up mtu and routes, and optionally runs pre/post up scripts. Running down optionally saves the current configuration, removes the WireGuard interface, and optionally runs pre/post down scripts. Running save saves the configuration of an existing interface without bringing the interface down. Use strip to output a configuration file with all wg-quick(8)-specific options removed, suitable for use with wg(8).
CONFIG_FILE is a configuration file, whose filename is the interface name followed by `.conf'. Otherwise, INTERFACE is an interface name, with configuration found at `/etc/wireguard/INTERFACE.conf', searched first, followed by distro-specific search paths.
Generally speaking, this utility is just a simple script that wraps invocations to wg(8) and ip(8) in order to set up a WireGuard interface. It is designed for users with simple needs, and users with more advanced needs are highly encouraged to use a more specific tool, a more complete network manager, or otherwise just use wg(8) and ip(8), as usual.
The configuration file adds a few extra configuration values to the format understood by wg(8) in order to configure additional attributes of an interface. It handles the values that it understands, and then it passes the remaining ones directly to wg(8) for further processing.
It infers all routes from the list of peers' allowed IPs, and automatically adds them to the system routing table. If one of those routes is the default route (0.0.0.0/0 or ::/0), then it uses ip-rule(8) to handle overriding of the default gateway.
The configuration file will be passed directly to wg(8)'s `setconf' sub- command, with the exception of the following additions to the Interface section, which are handled by this tool:
•      Address — a comma-separated list of IP (v4 or v6) addresses (optionally with CIDR masks) to be assigned to the interface. May be specified multiple times.
•      DNS — a comma-separated list of IP (v4 or v6) addresses to be set as the interface's DNS servers, or non-IP hostnames to be set as the interface's DNS search domains. May be specified multiple times. Upon bringing the interface up, this runs `resolvconf -a tun.INTERFACE -m 0 -x` and upon bringing it down, this runs `resolvconf -d tun.INTERFACE`. If these particular invocations of resolvconf(8) are undesirable, the PostUp and PostDown keys below may be used instead.
•      MTU — if not specified, the MTU is automatically determined from the endpoint addresses or the system default route, which is usually a sane choice. However, to manually specify an MTU to override this automatic discovery, this value may be specified explicitly.
•      Table — Controls the routing table to which routes are added. There are two special values: `off' disables the creation of routes altogether, and `auto' (the default) adds routes to the default table and enables special handling of default routes.
•      PreUp, PostUp, PreDown, PostDown — script snippets which will be executed by bash(1) before/after setting up/tearing down the interface, most commonly used to configure custom DNS options or firewall rules. The special string `%i' is expanded to INTERFACE. Each one may be specified multiple times, in which case the commands are executed in order.
•      SaveConfig — if set to `true', the configuration is saved from the current state of the interface upon shutdown. Any changes made to the configuration file before the interface is removed will therefore be overwritten.
Recommended INTERFACE names include `wg0' or `wgvpn0' or even `wgmgmtlan0'.  However, the number at the end is in fact optional, and really any free-form string [a-zA-Z0-9_=+.-]{1,15} will work. So even interface names corresponding to geographic locations would suffice, such as `cincinnati', `nyc', or `paris', if that's somehow desirable.
These examples draw on the same syntax found for wg(8), and a more complete description may be found there. Bold lines below are for options that extend wg(8).
The following might be used for connecting as a client to a VPN gateway for tunneling all traffic:
[Interface] Address = 10.200.100.8/24 DNS = 10.200.100.1 PrivateKey = oK56DE9Ue9zK76rAc8pBl6opph+1v36lm7cXXsQKrQM=
[Peer] PublicKey = GtL7fZc/bLnqZldpVofMCD6hDjrK28SsdLxevJ+qtKU= PresharedKey = /UwcSPg38hW/D9Y3tcS1FOV0K1wuURMbS0sesJEP5ak= AllowedIPs = 0.0.0.0/0 Endpoint = demo.wireguard.com:51820
The `Address` field is added here in order to set up the address for the interface. The `DNS` field indicates that a DNS server for the interface should be configured via resolvconf(8).  The peer's allowed IPs entry implies that this interface should be configured as the default gateway, which this script does.
Building on the last example, one might attempt the so-called ``kill- switch'', in order to prevent the flow of unencrypted packets through the non-WireGuard interfaces, by adding the following two lines `PostUp` and `PreDown` lines to the `[Interface]` section:
PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
The `PostUp' and `PreDown' fields have been added to specify an iptables(8) command which, when used with interfaces that have a peer that specifies 0.0.0.0/0 as part of the `AllowedIPs', works together with wg-quick's fwmark usage in order to drop all packets that are either not coming out of the tunnel encrypted or not going through the tunnel itself. (Note that this continues to allow most DHCP traffic through, since most DHCP clients make use of PF_PACKET sockets, which bypass Netfilter.) When IPv6 is in use, additional similar lines could be added using ip6tables(8).
Or, perhaps it is desirable to store private keys in encrypted form, such as through use of pass(1):
PostUp = wg set %i private-key <(pass WireGuard/private-keys/%i)
For use on a server, the following is a more complicated example involving multiple peers:
[Interface] Address = 10.192.122.1/24 Address = 10.10.0.1/16 SaveConfig = true PrivateKey = yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk= ListenPort = 51820
[Peer] PublicKey = xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg= AllowedIPs = 10.192.122.3/32, 10.192.124.1/24
[Peer] PublicKey = TrMvSoP4jYQlY6RIzBgbssQqY3vxI2Pi+y71lOWWXX0= AllowedIPs = 10.192.122.4/32, 192.168.0.0/16
[Peer] PublicKey = gN65BkIKy1eCE9pP1wdc8ROUtkHLF2PfAqYdyYBz6EA= AllowedIPs = 10.10.10.230/32
Notice the two `Address' lines at the top, and that `SaveConfig' is set to `true', indicating that the configuration file should be saved on shutdown using the current status of the interface.
A combination of the `Table', `PostUp', and `PreDown' fields may be used for policy routing as well. For example, the following may be used to send SSH traffic (TCP port 22) traffic through the tunnel:
[Interface] Address = 10.192.122.1/24 PrivateKey = yAnz5TF+lXXJte14tji3zlMNq+hd2rYUIgJBgB3fBmk= ListenPort = 51820 Table = 1234 PostUp = ip rule add ipproto tcp dport 22 table 1234 PreDown = ip rule delete ipproto tcp dport 22 table 1234
[Peer] PublicKey = xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg= AllowedIPs = 0.0.0.0/0
These configuration files may be placed in any directory, putting the desired interface name in the filename:
# wg-quick up /path/to/wgnet0.conf
For convenience, if only an interface name is supplied, it automatically chooses a path in `/etc/wireguard/':
# wg-quick up wgnet0
This will load the configuration file `/etc/wireguard/wgnet0.conf'.