YUM-ALIASES(1)

๐Ÿ“ฆ
version 4.23.0 ยท 5 versions
, in opensuse-leap 16.0

๐ŸŒธ NAME ๐ŸŒธ

yum-aliases โ€” bestie, this is a redirect to the DNF Command Reference โœจ (this page lives at YUM-ALIASES(1) in the DNF section, and honestly it's giving very "moved to a new address but left a cute note on the door" ๐Ÿ’Œ)


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

dnf [options] <command> [<args>...]

๐Ÿ’– DESCRIPTION ๐Ÿ’–

okay so DNF is the next upcoming major version of YUM โ€” you know, the whole package manager thing for RPM-based Linux distributions ๐Ÿง It roughly maintains CLI compatibility with YUM and defines a strict API for extensions and plugins. slay, backwards compat stays winning ๐Ÿ’…

Plugins can modify or extend features of DNF, or provide additional CLI commands on top of the ones mentioned below. and if you know the name of such a command (yes, including the commands mentioned below), you can find/install the package that provides it using the appropriate virtual provide in the form of dnf-command(<alias>), where <alias> is the name of the command. for example, dnf install 'dnf-command(versionlock)' installs a versionlock plugin ๐Ÿ”ฅ This approach also applies to specifying dependencies of packages that require a particular DNF command. iykyk.

๐Ÿ’€ Return values

  • 0 โ€” the 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
  • deplist
  • 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

๐Ÿงš Additional information

  • Options
  • Specifying Packages
  • Specifying Provides
  • Specifying File Provides
  • Specifying Groups
  • Specifying Transactions
  • Metadata Synchronization
  • Configuration Files Replacement Policy
  • Files
  • See Also

๐ŸŽ€ OPTIONS ๐ŸŽ€

okay bestie, here comes the big list โ€” every single flag, no cap, nothing skipped ๐Ÿ’…

  • -4 โ€” resolve to IPv4 addresses only.
  • -6 โ€” resolve to IPv6 addresses only.
  • --advisory=<advisory>, --advisories=<advisory> โ€” include packages corresponding to the advisory ID, e.g. FEDORA-2201-123. Applicable for the install, repoquery, updateinfo, upgrade and offline-upgrade (dnf-plugins-core) 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, upgrade and offline-upgrade (dnf-plugins-core) commands. ๐Ÿ›
  • --bz=<bugzilla>, --bzs=<bugzilla> โ€” include packages that fix a Bugzilla ID, e.g. 123123. Applicable for the install, repoquery, updateinfo, upgrade and offline-upgrade (dnf-plugins-core) 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. lowkey a lifesaver.

  • --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. cute lil paper trail ๐Ÿ“
  • -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/), e.g. CVE-2201-0123. Applicable for the install, repoquery, updateinfo, upgrade and offline-upgrade (dnf-plugins-core) 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. detective era ๐Ÿ”
  • --disableexcludes=[all|main|<repoid>], --disableexcludepkgs=[all|main|<repoid>] โ€” disable excludepkgs and includepkgs configuration options. Takes one of the following three options:
    • all, disables all excludepkgs and includepkgs configurations
    • main, disables excludepkgs and includepkgs defined in the [main] section
    • repoid, disables excludepkgs and includepkgs defined for the given repository

Note that the --exclude option appends to the [main] excludepkgs configuration and therefore is disabled when main or all is specified. โš ๏ธ

  • --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> โ€” temporarily disable active repositories for the purpose of the current dnf command. Accepts an id, a comma-separated list of ids, or a glob of ids. This option can be specified multiple times, but 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, modulesync, reposync or system-upgrade commands (dnf-plugins-core). ๐Ÿ“ฆ
  • --downloadonly โ€” download the resolved package set without performing any rpm transaction (install/upgrade/erase).

Packages are removed after the next successful transaction. This applies also when used together with --destdir option as the directory is considered as a part of the DNF cache. To persist the packages, use the download command instead. โš ๏ธ fr fr, they will vanish on you.

  • -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> โ€” temporarily enable additional repositories for the purpose of the current dnf command. Accepts an id, a comma-separated list of ids, or a glob of ids. This option can be specified multiple times.
  • --enhancement โ€” include enhancement relevant packages. Applicable for the install, repoquery, updateinfo, upgrade and offline-upgrade (dnf-plugins-core) 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. ๐Ÿ‘‹ rip bestie
  • --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. we love an assist ๐Ÿซถ
  • --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. ๐Ÿ˜ญ this one bites people, ok, read it twice ๐Ÿซถ

okay so back to the --installroot saga, bestie โ˜•โœจ โ€” this is the part where it gets a lil spicy if you're on a modular system.

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, upgrade and offline-upgrade (dnf-plugins-core) 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.
  • --releasever_major=<major version> โ€” Override the releasever_major variable, which is usually automatically detected or taken from the part of $releasever before the first ... This option does not affect the $releasever variable.
  • --releasever_minor=<minor version> โ€” Override the releasever_minor variable, which is usually automatically detected or taken from the part of $releasever after the first ... This option does not affect the $releasever variable.
  • --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, upgrade and offline-upgrade (dnf-plugins-core) commands.
  • --security โ€” Includes packages that provide a fix for a security issue. Applicable for the install, repoquery, updateinfo, upgrade and offline-upgrade (dnf-plugins-core) commands.
  • --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.
  • --transient โ€” Applicable only on bootc (bootable containers) systems. Perform transactions using a transient overlay which will be lost on the next reboot. See also the persistence configuration option.
  • -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.


๐Ÿ› ๏ธ COMMANDS ๐Ÿ› ๏ธ

For an explanation of <package-spec>, <package-file-spec> and <package-name-spec> see Specifying Packages.

For an explanation of <provide-spec> see Specifying Provides.

For an explanation of <group-spec> see Specifying Groups.

For an explanation of <module-spec> see Specifying Modules.

For an explanation of <transaction-spec> see Specifying Transactions.

Alias Command

Command: alias

Allows the user to define and manage a list of aliases (in the form <name=value>), which can be then used as dnf commands to abbreviate longer command sequences. For examples on using the alias command, see Alias Examples. For examples on the alias processing, see Alias Processing Examples.

To use an alias (name=value), the name must be placed as the first "command" (e.g. the first argument that is not an option). It is then replaced by its value and the resulting sequence is again searched for aliases. The alias processing stops when the first found command is not a name of any alias.

In case the processing would result in an infinite recursion, the original arguments are used instead.

Also, like in shell aliases, if the result starts with a \, the alias processing will stop.

All aliases are defined in configuration files in the /etc/dnf/aliases.d/ directory in the [aliases] section, and aliases created by the alias command are written to the USER.conf file. In case of conflicts, the USER.conf has the highest priority, and alphabetical ordering is used for the rest of the configuration files.

Optionally, there is the enabled option in the [main] section defaulting to True. This can be set for each file separately in the respective file, or globally for all aliases in the ALIASES.conf file.

dnf alias [options] [list] [<name>...]

List aliases with their final result. The [<alias>...] parameter further limits the result to only those aliases matching it.

dnf alias [options] add <name=value>...

Create new aliases.

dnf alias [options] delete <name>...

Delete aliases.

Alias Examples

dnf alias list Lists all defined aliases.

dnf alias add rm=remove Adds a new command alias called rm which works the same as the remove command.

dnf alias add upgrade="\upgrade --skip-broken --disableexcludes=all --obsoletes" Adds a new command alias called upgrade which works the same as the upgrade command, with additional options. Note that the original upgrade command is prefixed with a \ to prevent an infinite loop in alias processing.

Alias Processing Examples

If there are defined aliases in=install and FORCE="--skip-broken --disableexcludes=all":

  • dnf FORCE in will be replaced with dnf --skip-broken --disableexcludes=all install
  • dnf in FORCE will be replaced with dnf install FORCE (which will fail)

If there is defined alias in=install:

  • dnf in will be replaced with dnf install
  • dnf --repo updates in will be replaced with dnf --repo updates in (which will fail)

Autoremove Command

Command: autoremove Aliases for explicit NEVRA matching: autoremove-n, autoremove-na, autoremove-nevra

dnf [options] autoremove

Removes all packages from the system that were originally installed as dependencies of user-installed packages, but which are no longer required by any such package.

dnf [options] autoremove <spec>...

This is an alias for the Remove Command command with clean_requirements_on_remove set to True. It 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. It also removes any dependencies that are no longer needed.

There are also a few specific autoremove commands autoremove-n, autoremove-na and autoremove-nevra that allow the specification of an exact argument in the NEVRA (name-epoch:version-release.architecture) format.

This command by default does not force a sync of expired metadata. See also Metadata Synchronization.

Check Command

Command: check

dnf [options] check [--dependencies] [--duplicates] [--obsoleted] [--provides]

Checks the local packagedb and produces information on any problems it finds. You can limit the checks to be performed by using the --dependencies, --duplicates, --obsoleted and --provides options (the default is to check everything).

Check-Update Command

Command: check-update Aliases: check-upgrade

check-update ๐Ÿซถ

dnf [options] check-update [--changelogs] [<package-file-spec>...]

Okay bestie, so this one is like a little sneak peek ๐Ÿ‘€ โ€” it non-interactively checks if updates for the packages you specified are available. If you don't give it any <package-file-spec>, it checks whether any updates at all are available for your whole system. And the exit codes? Super important: DNF will exit with 100 when there are updates available and it'll print a list of them, 0 if there aren't any, and 1 if something goes wrong ๐Ÿ˜ญ. If you add the --changelogs option, it will also print the changelog delta of the packages that are about to be updated. So extra info, yay! โœจ

But wait, don't get it twisted: having a specific newer version available for an installed package (and reported by check-update) does not mean that a subsequent dnf upgrade will actually install it. The difference is that dnf upgrade has restrictions (like package dependencies being satisfied) to take into account. So it's giving "maybe", not "yes" ๐Ÿ’….

The output is affected by the autocheck_running_kernel configuration option. Just so you know! ๐ŸŒธ


Clean Command ๐Ÿงผ

Command: clean

This one performs cleanup of temporary files kept for repositories. It includes any such data left behind from disabled or removed repositories as well as for different distribution release versions. So it's like a little Marie Kondo for your repo cache โ€” does it spark joy? No? Toss it. ๐Ÿ—‘๏ธโœจ

  • dnf clean dbcache โ€” Removes cache files generated from the repository metadata. This forces DNF to regenerate the cache files the next time it is run. So next time it's gonna be a fresh start, periodt.
  • dnf clean expire-cache โ€” Marks the repository metadata expired. DNF will re-validate the cache for each repository the next time it is used. It's like setting a "best by" date and then being like, "actually, let me double-check" ๐Ÿ•ต๏ธโ€โ™€๏ธ.
  • dnf clean metadata โ€” Removes repository metadata. Those are the files which DNF uses to determine the remote availability of packages. Using this option will make DNF download all the metadata the next time it is run. So it's a full reset on the metadata front, no cap.
  • dnf clean packages โ€” Removes any cached packages from the system. Bye-bye, package clutter! ๐Ÿ‘‹
  • dnf clean all โ€” Does all of the above. The ultimate cleanup, the main character of clean commands. ๐Ÿ’…

Deplist Command ๐Ÿ“ฆ

dnf [options] deplist [<select-options>] [<query-options>] [<package-spec>]

This is a deprecated alias for dnf repoquery --deplist. So it's like the older sibling that's still around but, you know, deprecated. Still works, but maybe use the new one? ๐Ÿ‘€


Distro-Sync Command ๐Ÿ”„

Command: distro-sync

Aliases: dsync

Deprecated aliases: distrosync, distribution-synchronization

dnf distro-sync [<package-spec>...]

As necessary, this upgrades, downgrades, or keeps selected installed packages to match the latest version available from any enabled repository. If no package is given, all installed packages are considered. So it's like a sync-up with the repos โ€” whatever it takes to get you matching, it will do it. ๐Ÿ’ƒ

See also Configuration Files Replacement Policy. (iykyk)


Downgrade Command ๐Ÿ“‰

Command: downgrade

Aliases: dg

dnf [options] downgrade <package-spec>...

Downgrades the specified packages to the highest installable package of all known lower versions if possible. When a version is given and is lower than the version of the installed package, then it downgrades to the target version. So it's like, "we're going back, bestie" โช. Sometimes you just need that older version, and that's valid.


Group Command ๐Ÿ‘ฏโ€โ™€๏ธ

Command: group

Aliases: grp

Deprecated aliases: groups, grouplist, groupinstall, groupupdate, groupremove, grouperase, groupinfo

Groups are virtual collections of packages. DNF keeps track of groups that the user selected ("marked") installed and can manipulate the comprising packages with simple commands. Think of it like a curated playlist of packages โ€” you add the playlist, and all the songs come with it. ๐ŸŽถ

dnf [options] group [summary] <group-spec>

Display an overview of how many groups are installed and available. With a spec, limit the output to the matching groups. summary is the default groups subcommand. So if you just type group, it's like "hey, here's the summary" โœจ.

dnf [options] group info <group-spec>

Display package lists of a group. Shows which packages are installed or available from a repository when -v is used. So verbose mode gives you the tea โ˜•.

dnf [options] group install [--with-optional] <group-spec>...

Mark the specified group installed and install packages it contains. Also include optional packages of the group if --with-optional is specified. All Mandatory and Default packages will be installed whenever possible. Conditional packages are installed if they meet their requirement. If the group is already (partially) installed, the command installs the missing packages from the group. Depending on the value of the obsoletes configuration option, group installation takes obsoletes into account. So it's like, "get the whole squad together, and if you're already here, just fill in the missing members" ๐Ÿซถ.

dnf [options] group list <group-spec>...

List all matching groups, either among installed or available groups. If nothing is specified, list all known groups. The --installed and --available options narrow down the requested list. Records are ordered by the display_order tag defined in the comps.xml file. Provides a list of all hidden groups by using the option --hidden. Provides group IDs when the -v or --ids options are used. So you can filter, you can see hidden ones, you can get IDs โ€” it's giving full control ๐Ÿ’….

dnf [options] group remove <group-spec>...

Mark the group removed and remove those packages in the group from the system which do not belong to another installed group and were not installed explicitly by the user. So it's careful โ€” it won't just yeet everything, only the ones that are safe to remove. ๐Ÿงน

dnf [options] group upgrade <group-spec>...

Upgrades the packages from the group and upgrades the group itself. The latter comprises of installing packages that were added to the group by the distribution and removing packages that got removed from the group as far as they were not installed explicitly by the user. So it's like a glow-up for the group and its members โœจ.

Groups can also be marked installed or removed without physically manipulating any packages:

dnf [options] group mark install <group-spec>...

Mark the specified group installed. No packages will be installed by this command, but the group is then considered installed. It's like saying "I'm in" without actually showing up ๐Ÿ˜‚.

dnf [options] group mark remove <group-spec>...

Mark the specified group removed. No packages will be removed by this command. Same energy, but reverse. ๐Ÿ™ˆ

See also Configuration Files Replacement Policy. (Again, iykyk)


Help Command ๐Ÿ†˜

Command: help

dnf help [<command>]

Displays the help text for all commands. If given a command name, then it only displays help for that particular command. So if you're like "what does this do?", just ask for help. No shame in it, bestie. ๐Ÿซถ


History Command ๐Ÿ“œ

Command: history

Aliases: hist

The history command allows the user to view what has happened in past transactions and act according to this information (assuming the history_record configuration option is set). So it's like your DNF receipts โ€” you can see everything you've done and even redo or rollback. ๐Ÿงพโœจ

dnf history [list] [--reverse] [<spec>...]

The default history action is listing information about given transactions in a table. Each <spec> can be either a <transaction-spec>, which specifies a transaction directly, or a <transaction-spec>..<transaction-spec>, which specifies a range of transactions, or a <package-name-spec>, which specifies a transaction by a package which it manipulated. When no transaction is specified, list all known transactions. So you can be as specific or as broad as you want. ๐Ÿ’…

Note that transient transactions (see --transient) will be listed even though they do not make persistent changes to files under /usr or to the RPM database. So they're like ghosts โ€” they show up in the list but don't leave a trace. ๐Ÿ‘ป

The "Action(s)" column lists each type of action taken in the transaction. The possible values are:

  • Install (I): a new package was installed on the system
  • Downgrade (D): an older version of a package replaced the previously-installed version
  • Obsolete (O): an obsolete package was replaced by a new package
  • Upgrade (U): a newer version of the package replaced the previously-installed version
  • Remove (E): a package was removed from the system
  • Reinstall (R): a package was reinstalled with the same version
  • Reason change (C): a package was kept in the system but its reason for being installed changed

The "Altered" column lists the number of actions taken in each transaction, possibly followed by one or two of the following symbols:

  • >: The RPM database was changed, outside DNF, after the transaction
  • <: The RPM database was changed, outside DNF, before the transaction
  • *: The transaction aborted before completion
  • #: The transaction completed, but with a non-zero status
  • E: The transaction completed successfully, but had warning/error output

--reverse โ€” The order of history list output is printed in reverse order. So newest first? Actually, reverse order means the opposite of default. Just so you know. ๐Ÿ”„

dnf history info [<spec>...]

Describe the given transactions. The meaning of <spec> is the same as in the History List Command. When no transaction is specified, describe what happened during the latest transaction. So it's like a deep dive into the tea โ˜•.

dnf history redo <transaction-spec>|<package-file-spec>

Repeat the specified transaction. Uses the last transaction (with the highest ID) if more than one transaction for the given <package-file-spec> is found. If it is not possible to redo some operations due to the current state of RPMDB, it will not redo the transaction. So it's like "run it back" but only if it's safe. ๐Ÿ”

dnf history replay [--ignore-installed] [--ignore-extras] [--skip-unavailable] <filename>

Replay a transaction stored in the file <filename> by the History Store Command. The replay will perform the exact same operations on the packages as in the original transaction and will return with an error in case of any differences in installed packages or their versions. See also the Transaction JSON Format specification of the file format. So it's like a re-enactment, but it needs to be exact or it'll call it out. ๐ŸŽฌ

  • --ignore-installed โ€” Don't check for the installed packages being in the same state as those recorded in the transaction. E.g. in case there is an upgrade foo-1.0 -> foo-2.0 stored in the transaction, but there is foo-1.1 installed on the target system. So it's more chill about the starting point.
  • --ignore-extras โ€” Don't check for extra packages pulled into the transaction on the target system. E.g. the target system may not have some dependency, which was installed on the source system. The replay errors out on this by default, as the transaction would not be the same. So by default it's strict, but this flag makes it more forgiving.
  • --skip-unavailable โ€” In case some packages stored in the transaction are not available on the target system, skip them instead of erroring out. So it's like "if you can't find it, just move on" ๐Ÿšถโ€โ™€๏ธ.
dnf history rollback <transaction-spec>|<package-file-spec>

Undo all transactions performed after the specified transaction. Uses the last transaction (with the highest ID) if more than one transaction for the given <package-file-spec> is found. If it is not possible to undo some transactions due to the current state of RPMDB, it will not undo any transaction. So it's like a time machine, but only if everything is chill enough to go back. โณ

๐Ÿ’พ dnf history store

dnf history store [--output <output-file>] <transaction-spec>

Stores a transaction that you point at with <transaction-spec>, bestie. Later on you can replay it with the History Replay Command โ€” it's giving time capsule, honestly. ๐Ÿ•ฐ๏ธโœจ

โš ๏ธ Warning: the stored transaction format is considered unstable and may change at any time, no cap. It'll work if the same version of dnf is used to store and replay (or between versions as long as it stays the same). So don't be out here assuming it's forever-stable, because it is not. ๐Ÿ˜ญ
  • -o <output-file>, --output=<output-file> โ€” stores the serialized transaction into <output-file>. Default is transaction.json. ๐Ÿ—‚๏ธ

โ†ฉ๏ธ dnf history undo

dnf history undo <transaction-spec>|<package-file-spec>

Does the opposite of every single operation that got performed in the transaction you specify. Uses the last transaction (the one with the highest ID) if more than one transaction for the given <package-file-spec> is found. And lowkey important: if it's not possible to undo some operations because of the current state of RPMDB, it just won't undo the transaction โ€” periodt. ๐Ÿ’…

๐Ÿง dnf history userinstalled

dnf history userinstalled

Shows all the packages installed by user, installed from a group or a module profile, plus packages installed outside of DNF. I.e. it lists the packages that will stay on your system when Autoremove Command or Remove Command โ€” along with the clean_requirements_on_remove configuration option set to True โ€” gets executed. ๐Ÿซถ

Ngl the same results can be accomplished with dnf repoquery --userinstalled, and honestly the repoquery command is more powerful in formatting of the output. iykyk. โœจ


Okay so this command by default does not force a sync of expired metadata โ€” except for the redo, rollback, and undo subcommands. ๐Ÿ‘€ See also Metadata Synchronization and Configuration Files Replacement Policy.


๐Ÿ” Info Command

  • Command: info
  • Aliases: if
dnf [options] info [<package-file-spec>...]

Lists description and summary information about installed and available packages. Like a little gossip session about every package, honestly. ๐Ÿ’ฌ

The info command limits the displayed packages the same way as the list command does. Same energy, different output.

This command by default does not force a sync of expired metadata. See also Metadata Synchronization. ๐ŸŒˆ


๐Ÿ“ฆ Install Command

  • Command: install
  • Aliases: in
  • Aliases for explicit NEVRA matching: install-n, install-na, install-nevra
  • Deprecated aliases: localinstall
dnf [options] install <spec>...

Makes sure that the given packages and their dependencies are installed on the system. Each <spec> can be either a <package-spec>, or a @<module-spec>, or a @<group-spec>. See Install Examples below for the full tour. ๐ŸŽ€

If a given package or provide cannot be (and is not already) installed, the exit code will be non-zero. And if the <spec> matches both a @<module-spec> and a @<group-spec>, only the module is installed โ€” the group gets left on read, sorry. ๐Ÿ™ˆ

When a <package-spec> specifying the exact version of the package is given, DNF will install the desired version, no matter which version of the package is already installed. The former version of the package will be removed in the case of non-installonly package.

On the other hand, if <package-spec> specifies only a name, DNF also takes into account packages obsoleting it when picking which package to install. This behaviour is specific to the install command, bestie. Note that this can lead to seemingly unexpected results if a package has multiple versions and some older version is being obsoleted. It creates a split in the upgrade-path and both ways are considered correct โ€” the resulting package is picked simply by lexicographical order. Yeah. Lexicographical. Don't ask. ๐Ÿ’€

There are also a few specific install commands โ€” install-n, install-na and install-nevra โ€” that allow the specification of an exact argument in the NEVRA format. As a consequence, <spec> will not be matched with provides and file provides. ๐Ÿ‘‘

See also Configuration Files Replacement Policy.


๐ŸŒธ Install Examples

dnf install tito

Install the tito package (tito is the package name). Easy mode, slay. โœจ

dnf install ~/Downloads/tito-0.6.2-1.fc22.noarch.rpm

Install a local rpm file tito-0.6.2-1.fc22.noarch.rpm from the ~/Downloads/ directory. ๐Ÿ—‚๏ธ

dnf install tito-0.5.6-1.fc22

Install the package with a specific version. If the package is already installed it will automatically try to downgrade or upgrade to the specific version. Glow-up or glow-down, dealer's choice. ๐Ÿ’…

dnf --best install tito

Install the latest available version of the package. If the package is already installed it will try to automatically upgrade to the latest version. If the latest version of the package cannot be installed, the installation will fail. It's giving all-or-nothing. ๐Ÿ”ฅ

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. (Yes the double slash is on purpose, leave it alone lol.) ๐ŸŒ

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. File-provides match, iconic. ๐Ÿ“

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.). Basically the optional side quests of dependencies. ๐Ÿงš

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. Two vibes, one command. ๐Ÿ’ซ

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. Everything, everywhere, all at once. ๐ŸŒ

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. The mystery items. ๐Ÿ‘ป

dnf [options] list --obsoletes [<package-file-spec>...]

Lists packages installed on the system that are obsoleted by packages in any known repository. ๐Ÿ’€

dnf [options] list --recent [<package-file-spec>...]

Lists packages recently added into the repositories. Fresh out the oven. ๐Ÿ“

dnf [options] list --upgrades [<package-file-spec>...]

Lists upgrades available for the installed packages. Glow-up potential. ๐Ÿ”ฅ

dnf [options] list --autoremove

Lists packages which will be removed by the dnf autoremove command. ๐Ÿ—‘๏ธ

This command by default does not force a sync of expired metadata. See also Metadata Synchronization. โœจ


๐Ÿ—„๏ธ 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). Efficient queen behaviour, honestly. ๐Ÿ‘‘

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, it will terminate immediately if it's too soon after the last successful makecache run (see dnf.conf(5), metadata_timer_sync), and if the first mirror in a repository mirrorlist fails, it will not try to synchronize the metadata from more mirrors for that repository. Low-power mode, very considerate. ๐Ÿ”‹


๐Ÿท๏ธ 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 the clean_requirements_on_remove configuration option set to True โ€” is executed. Protecting your faves, basically. ๐Ÿซถ

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 the 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. Safety first, bestie. ๐Ÿ’…

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. Squad protection. ๐Ÿ‘ฏ


๐Ÿงฉ 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. Don't try it, bestie, it will not work. ๐Ÿ˜ญ
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. Targeted update, no collateral. ๐ŸŽฏ

  • dnf [options] module switch-to <module-spec>... โ€” switches to (or enables) a module stream, flips your installed packages over to the versions the new stream provides, and yeets the packages from the old stream that aren't available anymore. It also updates any installed profiles that exist for the new stream. If a profile was actually given, it installs that profile and does not touch profiles that are already installed.

Think of it as dnf module enable but on hard mode โ€” it doesn't just enable modules, it also does a distrosync to all the modular packages in the enabled modules.

It's also like a stronger dnf module install, but you have to spell out the profiles you want installed, because switch-to doesn't use default profiles. And it doesn't just install profiles either โ€” it makes a distrosync to all the modular packages in the installed module. ๐Ÿ’…

  • dnf [options] module remove <module-spec>... โ€” removes installed module profiles, including the packages that got pulled in with dnf module install. It will not remove packages that other installed module profiles need, or that other user-installed packages need. If no profile was provided, all installed profiles get removed.
  • dnf [options] module remove --all <module-spec>... โ€” same deal as above, but with --all it additionally removes all packages whose names are provided by the specified modules. Packages required by other installed module profiles are safe, and so are packages whose names are also provided by any other module. ๐Ÿ›ก๏ธ
  • dnf [options] module enable <module-spec>... โ€” enables a module stream and makes that stream's RPMs available in the package set.

Modular dependencies get resolved, dependencies get checked, and everything gets enabled recursively. If there's a modular dependency issue, the whole operation gets rejected โ€” to force it through anyway, hit it with the --skip-broken option.

๐Ÿšจ Heads up bestie: this command cannot be used for switching module streams. Use dnf module switch-to for that, iykyk.
  • dnf [options] module disable <module-name>... โ€” disables a module. Every related module stream becomes unavailable, which means all installed profiles get removed and the module's RPMs stop being available in the package set. Same drama as before: if there's a modular dependency issue, the operation gets rejected, and you can use --skip-broken to push it through anyway.
  • dnf [options] module reset <module-name>... โ€” resets module state so it's no longer enabled or disabled. Consequently all installed profiles get removed, and only RPMs from the default stream stay available in the package set. โœจ fresh start energy โœจ
  • dnf [options] module provides <package-name-spec>... โ€” lists every modular package matching <package-name-spec> from all modules (disabled ones included), plus the modules and streams they belong to. Full receipts.
  • dnf [options] module list [--all] [module_name...] โ€” lists all module streams, their profiles, and their states (enabled, disabled, default).
  • dnf [options] module list --enabled [module_name...] โ€” lists only the module streams that are enabled.
  • dnf [options] module list --disabled [module_name...] โ€” lists only the module streams that are disabled.
  • dnf [options] module list --installed [module_name...] โ€” lists module streams that have installed profiles.
  • dnf [options] module info <module-spec>... โ€” prints the detailed tea โ˜• about a given module stream.
  • dnf [options] module info --profile <module-spec>... โ€” same, but for the given module profiles.
  • dnf [options] module repoquery <module-spec>... โ€” lists all available packages belonging to the selected modules.
  • dnf [options] module repoquery --available <module-spec>... โ€” lists all available packages belonging to the selected modules.
  • dnf [options] module repoquery --installed <module-spec>... โ€” lists all installed packages with the same name as packages belonging to the selected modules.

๐ŸŒธ Provides Command ๐ŸŒธ

Command: provides Aliases: prov, whatprovides, wp

  • dnf [options] provides <provide-spec> โ€” finds the packages that provide the given <provide-spec>. This is the move when you know a filename and you're like "okay but which package (installed or not) gives me this file??" ๐Ÿ˜ญ

The <provide-spec> gets looked for gradually, in this order:

  1. <provide-spec> is matched against 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
  1. Then all provides of all available packages get 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
  1. DNF assumes <provide-spec> is a system command, prepends it with the /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) the /bin and /sbin prefixes get searched too:
$ dnf provides zless
gzip-1.9-9.fc29.x86_64 : The GNU data compression program
Matched from:
Filename    : /usr/bin/zless
  1. If that last step also fails, DNF returns "Error: No Matches found". brutal but fair
This command by default does not force a sync of expired metadata. See also Metadata Synchronization.

๐Ÿฆ‹ Reinstall Command ๐Ÿฆ‹

Command: reinstall Aliases: rei

  • dnf [options] reinstall <package-spec>... โ€” installs the specified packages, and fails if some of them are either not installed or not available (like, there's no repository where it can download the same RPM). No sneaky new installs, no cap.

๐Ÿ’€ 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 ones being removed. Each <spec> can be either a <package-spec> (specifies a package directly) or a @<group-spec> (specifies an (environment) group that contains it). If clean_requirements_on_remove is enabled โ€” and it's the default, so yes โ€” it also removes any dependencies that are no longer needed.
  • dnf [options] remove --duplicates โ€” removes older versions of duplicate packages. To keep the system's integrity intact it reinstalls the newest package. In some cases the command cannot resolve conflicts โ€” in those 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 the latest versions and the version of the running kernel. ๐Ÿ‘‘

Remove Examples

  • dnf remove acpi tito โ€” removes the acpi and tito packages.
  • dnf remove $(dnf repoquery --extras --exclude=tito,acpi) โ€” removes packages not present in any repository, but doesn't remove the tito and acpi packages (they still might get removed if they depend on some of the removed packages).
  • dnf remove --duplicates โ€” removes older versions of duplicated packages (an equivalent of yum's package-cleanup --cleandups).

๐ŸŽ€ Repoinfo Command ๐ŸŽ€

Command: repoinfo

An alias for the repolist command that gives you more detailed info, like dnf repolist -v. โœจ


๐ŸŒˆ Repolist Command ๐ŸŒˆ

Command: repolist

  • dnf [options] repolist [--enabled|--disabled|--all] โ€” depends on the exact command, lists enabled, disabled or all known repositories. Lists all enabled repositories by default. Gives more detailed info when the -v option is used.
This command by default does not force a sync of expired metadata. See also Metadata Synchronization.

โญ 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 info about them. Literally the equivalent of rpm -q but for remote repositories.

  • dnf [options] repoquery --groupmember <package-spec>... โ€” lists the groups that contain <package-spec>.
  • dnf [options] repoquery --querytags โ€” gives you 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 let you specify an exact argument in the NEVRA format (does not affect arguments of options like --whatprovides <arg>, ...). As a consequence, <spec> will not be matched with file provides.


๐Ÿ’œ Select Options ๐Ÿ’œ

Together with <package-file-spec>, these control what packages show up in the output. If <package-file-spec> is given, it 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]) or a file provide. See Specifying Packages.
  • -a, --all โ€” query all packages (for rpmquery compatibility, also a shorthand for repoquery '*' or repoquery with no arguments). ๐Ÿซถ
  • --arch <arch>[,<arch>...], --archlist <arch>[,<arch>...] โ€” limits the resulting set to only packages of the selected architectures (default is all architectures). In some cases the result is affected by the basearch of the running system, so to run repoquery for an arch that's incompatible with your system, use the --forcearch=<arch> option to change the basearch. iykyk ๐Ÿ’…
  • --duplicates โ€” narrows the result set down to installed duplicate packages, aka when you've got more than one package version for the same name and architecture. Heads up tho: installonly packages are excluded from this set, no cap ๐Ÿ’…
  • --unneeded โ€” narrows things down to leaf packages that got installed as dependencies and honestly just aren't needed anymore. Think of it as the sneak peek of what's gonna get yeeted once you run dnf autoremove โ€” it lists the packages that are going to be removed after that command executes ๐Ÿ˜ญ
  • --available โ€” limits the result set to available packages only. This one's set by default, so it's already doing its thing โœจ
  • --disable-modular-filtering โ€” turns off filtering of modular packages, so packages from inactive module streams get included in the result. literally un-filtering the filtered ๐Ÿฆ‹
  • --extras โ€” limits the result set to packages that are not present in any of the available repositories. the ones that don't belong to any repo, iconically extra ๐Ÿ‘‘
  • -f <file>, --file <file> โ€” limits the result set to only the package that owns <file>. you point at a file, it finds the parent package. main character detective energy ๐Ÿ”
  • --installed โ€” limits the result set to installed packages only. ngl, the exclude option in the configuration file might influence the result โ€” but if you use the command line option --disableexcludes, it ensures that all installed packages will be listed. periodt ๐Ÿ’–
  • --installonly โ€” limits the result set to installed installonly packages. that's it, that's the vibe ๐ŸŒธ
  • --latest-limit <number> โ€” limits the result set to <number> of latest packages for every package name and architecture. If <number> is negative, it skips <number> of the latest packages instead. And for a negative <number> you gotta use the --latest-limit=<number> syntax, ok bestie? the equals sign is not optional there ๐Ÿ™ˆ
  • --recent โ€” limits the result set to packages that were recently edited. fresh off the press vibes โญ
  • --repo <repoid> โ€” limits the result set to only packages from a repository identified by <repoid>. You can use this multiple times and it stacks with accumulative effect โ€” the more the merrier ๐ŸŽ€
  • --unsatisfied โ€” reports unsatisfied dependencies among installed packages, i.e. missing requires and existing conflicts. it's giving "something is wrong and we're gonna tell you about it" ๐Ÿ’€
  • --upgrades โ€” limits the result set to packages that provide an upgrade for some already installed package. glow-up packages only ๐Ÿ”ฅ
  • --userinstalled โ€” limits the result set to packages installed by the user. Same deal as before: 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. we love consistency ๐Ÿซถ
  • --whatdepends <capability>[,<capability>...] โ€” limits the result set to only packages that require, enhance, recommend, suggest or supplement any of <capabilities>. it catches the whole dependency friend group ๐Ÿ’œ
  • --whatconflicts <capability>[,<capability>...] โ€” limits the result set to only packages that conflict with any of <capabilities>. enemies-to-lovers but make it rpm ๐Ÿ˜ค
  • --whatenhances <capability>[,<capability>...] โ€” limits the result set to only packages that enhance any of <capabilities>. And if you want to list all depending packages, use --whatdepends instead โœจ
  • --whatobsoletes <capability>[,<capability>...] โ€” limits the result set to only packages that obsolete any of <capabilities>. out with the old, in with the new ๐ŸŒˆ
  • --whatprovides <capability>[,<capability>...] โ€” limits the result set to only packages that provide any of <capabilities>. the providers, the givers, the suppliers ๐Ÿ’…
  • --whatrecommends <capability>[,<capability>...] โ€” limits the result set to only packages that recommend any of <capabilities>. Use --whatdepends if you want to list all depending packages, k? ๐ŸŽ€
  • --whatrequires <capability>[,<capability>...] โ€” limits the result set to only packages that require any of <capabilities>. And yes, use --whatdepends if you want to list all depending packages ๐Ÿ’–
  • --whatsuggests <capability>[,<capability>...] โ€” limits the result set to only packages that suggest any of <capabilities>. Use --whatdepends if you want to list all depending packages, bestie ๐Ÿฆ‹
  • --whatsupplements <capability>[,<capability>...] โ€” limits the result set to only packages that supplement any of <capabilities>. Use --whatdepends if you want to list all depending packages ๐ŸŒธ
  • --alldeps โ€” this one is stackable with --whatrequires or --whatdepends only. Additionally it adds all packages requiring the package features to the result set (used as default). it's the "bring everyone" option ๐Ÿซถ
  • --exactdeps โ€” also stackable with --whatrequires or --whatdepends only. Limits the resulting set to only packages that require <capability> specified by --whatrequires. no extra friends allowed, exact list only ๐Ÿ”’
  • --srpm โ€” operate on the corresponding source RPM. simple, iconic, done ๐Ÿ‘‘

โœจ Query Options โœจ

So this is where you set what info gets displayed about each package. ๐Ÿ’–

The following are mutually exclusive, i.e. at most one can be specified โ€” pick ONE, bestie, don't get greedy. 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. every single file, no crumbs ๐Ÿ“
  • -s, --source โ€” show the package source RPM name ๐ŸŽ€
  • --changelogs โ€” print the package changelogs. the lore, basically ๐Ÿ“œ
  • --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. the whole dependency web ๐Ÿ•ธ๏ธ
  • --enhances โ€” display capabilities enhanced by the package. Same as --qf "%{enhances}"". โœจ
  • --location โ€” show a location where the package could be downloaded from. the coordinates, the address, the link ๐Ÿ—บ๏ธ
  • --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. it's a whole family tree, lowkey stunning ๐ŸŒณ
  • --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). newest providers only unless you say otherwise ๐Ÿ’–
  • --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). this is the default one, the main character ๐Ÿ‘‘
  • --envra โ€” show found packages in the epoch:name-version-release.architecture format. Same as --qf "%{epoch}:%{name}-%{version}-%{release}.%{arch}". same energy, different order ๐Ÿ’ซ
  • --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. And the list of recognized tags can be displayed by running dnf repoquery --querytags. go off, customize your whole aesthetic ๐ŸŽจ
  • --recursive โ€” query packages recursively. Has to be used with --whatrequires <REQ> (optionally with --alldeps, but not with --exactdeps) or with --requires <REQ> --resolve. don't try to freestyle this one ๐Ÿ”
  • --resolve โ€” resolve capabilities to originating package(s). trace it back to the source, always ๐Ÿงš

๐ŸŒธ Repoquery Examples ๐ŸŒธ

ok so here's the good stuff, real use cases, let's go ๐Ÿ’–

  • dnf repoquery 'light*' โ€” display NEVRAs of all available packages matching light*
  • dnf repoquery-na 'light*.noarch' โ€” display NEVRAs of all available packages matching name light* and architecture noarch (accepts only arguments in the "<name>.<arch>" format, so don't get cute with it)
  • dnf repoquery --requires lighttpd โ€” display requires of all lighttpd packages
  • dnf repoquery --requires python --resolve โ€” display packages providing the requires of python packages
  • dnf repoquery --source lighttpd โ€” display source rpm of lighttpd package
  • dnf repoquery --file /etc/lighttpd/lighttpd.conf โ€” display package name that owns the given file
  • dnf repoquery --queryformat '%{name}.%{arch} : %{reponame}' lighttpd โ€” display name, architecture and the containing repository of all lighttpd packages
  • dnf repoquery --whatprovides webserver โ€” display all available packages providing "webserver"
  • dnf repoquery --whatprovides webserver --arch i686 โ€” display all available packages providing "webserver" but only for the "i686" architecture
  • dnf repoquery --duplicates โ€” display duplicate packages

And this absolute unit of a command, look at it:

dnf repoquery --disablerepo="*" --enablerepo="*-source" --arch=src
--whatrequires <provide>

that one displays source packages that require a <provide> for a build. iykyk ๐Ÿ”ฅ


๐Ÿ‘‘ Repository-Packages Command ๐Ÿ‘‘

Command: repository-packages Deprecated aliases: repo-pkgs, repo-packages, repository-pkgs

So the repository-packages command lets you run commands on top of all the packages in the repository named <repoid>. But plot twist: any dependency resolution still takes into account packages from all enabled repositories, so it's not as closed-off as it looks ๐Ÿ’…

The <package-file-spec> and <package-spec> specifications further limit the candidates to only those packages matching at least one of them โ€” narrow it down, bestie.

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. one gives you the lore, the other gives you the receipts ๐ŸŽ€

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. no clicking required ๐Ÿซถ

dnf [options] repository-packages <repoid> info [--all]
[<package-file-spec>...]

List all related packages. everybody in the group chat ๐Ÿ“‹

dnf [options] repository-packages <repoid> info --installed
[<package-file-spec>...]

List packages installed from the repository. the ones already living on your system ๐Ÿ 

dnf [options] repository-packages <repoid> info --available
[<package-file-spec>...]

List packages available in the repository but not currently installed on the system. the ones still waiting outside, watching through the window ๐Ÿ˜ญ

Okay so weโ€™re still deep in repository-packages and itโ€™s giving so many subcommands โ€” but you got this, bestie. ๐Ÿ’…

dnf [options] repository-packages <repoid> info --extras
[<package-file-specs>...]

Lists packages installed from the repository that are not available in any repository. Iconic little โ€œwhere did you even come fromโ€ behavior. โœจ

dnf [options] repository-packages <repoid> info --obsoletes
[<package-file-spec>...]

Lists packages in the repository that obsolete packages installed on the system. The drama of replacement, honestly. ๐Ÿ’€

dnf [options] repository-packages <repoid> info --recent
[<package-file-spec>...]

Lists packages recently added into the repository. Fresh drops only. ๐Ÿ“

dnf [options] repository-packages <repoid> info --upgrades
[<package-file-spec>...]

Lists packages in the repository that upgrade packages installed on the system. Glow-up candidates, basically. โฌ†๏ธ

dnf [options] repository-packages <repoid> install [<package-spec>...]

Installs packages matching <package-spec> from the repository. If <package-spec> isnโ€™t specified at all, install all packages from the repository. Not me installing the entire repo ๐Ÿ’€

dnf [options] repository-packages <repoid> list [--all]
[<package-file-spec>...]

Lists all related packages. The whole friend group. ๐Ÿซถ

dnf [options] repository-packages <repoid> list --installed
[<package-file-spec>...]

Lists packages installed from the repository. Your current roster. ๐Ÿ’–

dnf [options] repository-packages <repoid> list --available
[<package-file-spec>...]

Lists packages available in the repository but not currently installed on the system. The โ€œnot in your cart yetโ€ shelf. ๐Ÿ›’

dnf [options] repository-packages <repoid> list --extras
[<package-file-spec>...]

Lists packages installed from the repository that are not available in any repository. Theyโ€™re giving mysterious backstory. ๐ŸŒซ๏ธ

dnf [options] repository-packages <repoid> list --obsoletes
[<package-file-spec>...]

Lists packages in the repository that obsolete packages installed on the system. Replacement era. ๐Ÿ‘‘

dnf [options] repository-packages <repoid> list --recent
[<package-file-spec>...]

Lists packages recently added into the repository. New arrivals, no cap. ๐Ÿฆ‹

dnf [options] repository-packages <repoid> list --upgrades
[<package-file-spec>...]

Lists packages in the repository that upgrade packages installed on the system. Upgrade season. ๐Ÿ”ฅ

dnf [options] repository-packages <repoid> move-to [<package-spec>...]

Reinstalls all those packages that are available in the repository. Itโ€™s a relocation moment. ๐Ÿšš

dnf [options] repository-packages <repoid> reinstall [<package-spec>...]

Runs the reinstall-old subcommand. If it fails, runs the move-to subcommand. Backup plan energy. ๐Ÿ˜ญ

dnf [options] repository-packages <repoid> reinstall-old
[<package-spec>...]

Reinstalls all those packages that were installed from the repository and simultaneously are available in the repository. Bestie, itโ€™s a double-check. โœจ

dnf [options] repository-packages <repoid> remove [<package-spec>...]

Removes 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) it also removes any dependencies that are no longer needed. Bye bestie ๐Ÿ‘‹

dnf [options] repository-packages <repoid> remove-or-distro-sync
[<package-spec>...]

Selects all packages installed from the repository. Upgrades, downgrades or keeps those of them that are available in another repository to match the latest version available there, and removes the others along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) it also removes any dependencies that are no longer needed. Itโ€™s giving choose your fighter. ๐Ÿ’…

dnf [options] repository-packages <repoid> remove-or-reinstall
[<package-spec>...]

Selects all packages installed from the repository. Reinstalls those of them that are available in another repository and removes the others along with any packages depending on the packages being removed. If clean_requirements_on_remove is enabled (the default) it also removes any dependencies that are no longer needed. Reinstall or evict, no in-between. ๐Ÿšช

dnf [options] repository-packages <repoid> upgrade [<package-spec>...]

Updates all packages to the highest resolvable version available in the repository. When versions are specified in the <package-spec>, updates to these versions. Glow-up to the highest version you can actually resolve. โญ

dnf [options] repository-packages <repoid> upgrade-to
[<package-specs>...]

A deprecated alias for the upgrade subcommand. Old alias, still slaying, but deprecated. ๐Ÿ™ˆ


๐Ÿ” Search Command

Command: search โ€” Aliases: se

dnf [options] search [--all] <keywords>...

Searches package metadata for keywords. Keywords are matched as case-insensitive substrings, and globbing is supported. By default it lists packages that match all requested keys (AND operation). Keys are searched in package names and summaries. If the --all option is used, it 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. So relevant. ๐ŸŽฏ

This command by default does not force a sync of expired metadata. See also Metadata Synchronization.


๐Ÿš Shell Command

Command: shell โ€” Aliases: sh

dnf [options] shell [filename]

Opens 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. Itโ€™s a whole little DNF hangout. ๐Ÿซถ

  • config [conf-option] [value]
    • Sets a configuration option to a requested value. If no value is given it prints the current value.
  • repo [list|enable|disable] [repo-id]
    • list: lists repositories and their status
    • enable: enables repository
    • disable: disables repository
  • transaction [list|reset|solve|run]
    • list: resolves and lists the content of the transaction
    • reset: resets the transaction
    • run: resolves and runs 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>

Removes remove-spec and installs 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. One transaction, zero drama. ๐Ÿ’…


๐Ÿ“ฐ 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>...]

Displays information about update advisories. Depending on the output type, DNF displays just counts of advisory types (omitted or --summary), a 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 the date of the last advisory update is added. So much tea in one command. โ˜•

<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 display 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. If itโ€™s not resolvable, itโ€™s not invited. โœจ

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>, updates to these versions.

dnf [options] upgrade @<spec>...

Alias for the dnf module update command. Modular behavior, periodt. ๐Ÿ’…

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.

See also Configuration Files Replacement Policy.


๐ŸŒฑ Upgrade-Minimal Command

Command: upgrade-minimal โ€” Aliases: up-min โ€” Deprecated aliases: update-minimal

dnf [options] upgrade-minimal

Updates each package to the nearest available version that provides a bugfix, enhancement or a fix for a security issue (security). Minimalist glow-up, still iconic. ๐ŸŒฑ

dnf [options] upgrade-minimal <package-spec>...

Updates each specified package to the nearest available version that provides a bugfix, enhancement or a fix for security issue (security). Updates dependencies as necessary.

๐Ÿ’– SPECIFYING PACKAGES ๐Ÿ’–

okay so like SO many commands take a <package-spec> parameter that picks which package the operation happens on, and this arg gets matched against package NEVRAs, provides and file provides. three whole vibes.

<package-file-spec> is basically the same thing but it's giving "no provides matching today", so it's matched only against NEVRAs and file provides. that's it, that's the whole personality.

<package-name-spec>? matched against NEVRAs only. minimal, focused, iconic.

๐Ÿ”ฎ Globs

package specification supports the exact same glob pattern matching that your shell does, and in all three of the above-mentioned things it matches against (NEVRAs, provides and file provides). equal opportunity globbing bestie ๐Ÿ’…

the supported patterns are:

  • * โ€” 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. and if the first character following the [ is a ! or a ^ then any character not enclosed is matched. fancy.
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 they're quoted or escaped, dnf will not expand them. ngl that's a trap, don't fall in ๐Ÿซถ

๐Ÿงš NEVRA Matching

when matching against NEVRAs, partial matching is supported. DNF tries to match the spec against this list of NEVRA forms, in decreasing order of priority:

  • name-[epoch:]version-release.arch
  • name.arch
  • name
  • name-[epoch:]version-release
  • name-[epoch:]version

note that name can in general contain dashes (e.g. package-with-dashes) โ€” dashes really be living their best life in there.

the first form that matches any packages is used and the remaining forms are not tried. and 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 also attempts to match against provides and file provides of packages as well. she's thorough like that โœจ

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. no cap, that one's on the format.

๐ŸŽ€ Specifying NEVRA Matching Explicitly

some commands (autoremove, install, remove and repoquery) also have aliases with the suffixes -n, -na and -nevra that let you explicitly say how the arguments get parsed:

  • 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.

like, no guessing games. you said it, she does it ๐Ÿ’…


๐ŸŒธ SPECIFYING PROVIDES ๐ŸŒธ

<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. the name of the package) or a file provide. the selection is case-sensitive and globbing is supported. periodt.

๐Ÿฆ‹ Specifying File Provides

if a spec starts with either / or */, it is considered as a potential file provide. yes queen, the leading slash is the whole tell ๐Ÿ”ฅ


๐Ÿ‘‘ SPECIFYING GROUPS ๐Ÿ‘‘

<group-spec> lets you select (environment) groups that a particular operation should work on. it's a case insensitive string (supporting globbing characters) matched against a group's ID, canonical name, and name translated into the current LC_MESSAGES locale (if possible). multilingual queen ๐ŸŒˆ


โญ SPECIFYING MODULES โญ

<module-spec> lets you select modules or profiles a particular operation should work on.

it comes in the form of NAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE and the 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. she has a whole fallback list, she's so prepared ๐Ÿซถ


๐Ÿ’€ SPECIFYING TRANSACTIONS ๐Ÿ’€

<transaction-spec> can be in one of several forms. if it's 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 the offset-th transaction preceding the most recent transaction. so like... last-1, the one right before. go back in time bestie โช


๐Ÿ™ˆ PACKAGE FILTERING ๐Ÿ™ˆ

package filtering filters packages out of the available package set, making them invisible to most of dnf commands. and no, they cannot be used in a transaction. gone, ghosted, uninvited ๐Ÿ’€ 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. it 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 this combination of command line options:

dnf --disableexcludes=all --disableplugin="*" install bash

that's the "let me in, literally let me in" combo ๐Ÿ”ฅ

๐Ÿงš Modular Filtering

please see the modularity documentation for details on how modular filtering works. (that's the polite "go read the other page" ๐Ÿ’…)

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. detective work, we love to see it ๐Ÿ•ต๏ธ


๐ŸŒˆ METADATA SYNCHRONIZATION ๐ŸŒˆ

correct operation of DNF depends on having access to up-to-date data from all enabled repositories, but contacting remote mirrors on every single operation considerably slows it down and costs bandwidth for both the client and the repository provider. like, both sides paying the price, not fair ๐Ÿ’ธ

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. math queen ๐Ÿงฎโœจ

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. you always have the power to refresh, bestie ๐Ÿซถ


๐ŸŽ€ CONFIGURATION FILES REPLACEMENT POLICY ๐ŸŽ€

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 an additional suffix to the origin name. which file should maintain the true name after the transaction is not controlled by the package manager but is specified by each package itself, following packaging guideline. so like, not dnf's decision, she's just the messenger ๐Ÿ’…


๐Ÿ“ FILES ๐Ÿ“

Cache Files

/var/cache/dnf

Main Configuration

/etc/dnf/dnf.conf

Repository

/etc/yum.repos.d/


๐Ÿ’œ SEE ALSO ๐Ÿ’œ


โœจ AUTHOR โœจ

see AUTHORS in the DNF source distribution. (iconic behaviour, honestly ๐Ÿ‘‘)

2012-2020, Red Hat, Licensed under GPLv2+


and that's the whole page, bestie!! ๐ŸŽ‰ you made it to the very end โ€” the goods are version 4.23.0, dated Mar 19, 2025, and it's filed under YUM-ALIASES(1) in the manual. go forth and specify your packages with confidence ๐Ÿ’–โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from