YUM(8)

๐Ÿ’… YUM(8) โ€” the yum page, aka the DNF Command Reference ๐ŸŽ€

Okay bestie, so you typed man yum and this is what came out โ€” it's the yum page, and honestly? It's just redirecting to DNF, no cap. Sit down, grab a strawberry drink ๐Ÿ“, and let's get into it.


โœจ NAME โœจ

yum โ€” redirecting to DNF Command Reference. That's it, that's the whole name. She's a forwarding address at this point ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

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

That's the whole shape of it. Options first, then the command, then whatever args the command wants. Periodt.


๐ŸŒธ DESCRIPTION ๐ŸŒธ

So DNF is the next upcoming major version of YUM โ€” a package manager for RPM-based Linux distributions. She roughly maintains CLI compatibility with YUM (so your old muscle memory mostly survives ๐Ÿ˜ญ) and defines a strict API for extensions and plugins. Strict API = she has boundaries, and honestly we respect it ๐Ÿ‘‘

Plugins can modify or extend features of DNF, or straight-up hand you additional CLI commands on top of the ones listed below. And here's the cute part: if you know the name of such a command (including the ones mentioned below), you may 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. Like, for example, dnf install 'dnf-command(versionlock)' installs a versionlock plugin. Slay. This approach also applies to specifying dependencies of packages that require a particular DNF command โ€” iykyk.

๐Ÿงฎ Return values (the vibe check on exit) ๐Ÿงฎ

  • 0 : Operation was successful. She ate. ๐Ÿ”ฅ
  • 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 this is the big one, bestie โ€” every single flag, no skips, no "you get the idea". She's thorough ๐Ÿ’…

  • -4 โ€” Resolve to IPv4 addresses only. IPv4 girlie only ๐ŸŒˆ
  • -6 โ€” Resolve to IPv6 addresses only.
  • --advisory=<advisory>, --advisories=<advisory> โ€” Include packages corresponding to the advisory ID, Eg. FEDORA-2201-123. Applicable for the install, repoquery, updateinfo, 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. Lowkey chaotic but she's solving problems ๐Ÿซถ
  • --assumeno โ€” Automatically answer no for all questions. The introvert flag, honestly ๐Ÿ™ˆ
  • -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. So bestie, "best" is best-effort for the deps, okay? No cap on that nuance โญ

  • --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, Eg. 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. Sharing is caring, fr fr ๐Ÿงš

  • --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. Little diary entry for your packages ๐Ÿ““
  • -c <config file>, --config=<config file> โ€” Configuration file location.
  • --cve=<cves>, --cves=<cves> โ€” Include packages that fix a CVE (Common Vulnerabilities and Exposures) ID (http://cve.mitre.org/about/), Eg. CVE-2201-0123. Applicable for the install, repoquery, updateinfo, 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. She's old news, bestie ๐Ÿ’€
  • --debugsolver โ€” Dump data aiding in dependency solver debugging into ./debugdata.
  • --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. Important lil gotcha ๐ŸŽ€

  • --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. PICK ONE, bestie ๐Ÿ˜ญ
  • --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. So she downloads and then bins them โ€” that's not a bug, that's the deal ๐Ÿ™ˆ

  • -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. She's retired, respect her legacy ๐Ÿ’œ
  • --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. Manifesting a whole different CPU โœจ
  • -h, --help, --help-cmd โ€” Show the help.
  • --installroot=<path> โ€” Specifies an alternative installroot, relative to where all packages will be installed. Think of this like doing chroot <root> dnf, except using --installroot allows dnf to work before the chroot is created. It requires absolute path.
    • cachedir, log files, releasever, and gpgkey are taken from or stored in the installroot. Gpgkeys are imported into the installroot from a path relative to the host which can be specified in the repository section of configuration files.
    • configuration file and reposdir are searched inside the installroot first. If they are not present, they are taken from the host system. Note: When a path is specified within a command line argument (--config=<config file> in case of configuration file and --setopt=reposdir=<reposdir> for reposdir) then this path is always relative to the host with no exceptions.
    • vars are taken from the host system or installroot according to reposdir. When reposdir path is specified within a command line argument, vars are taken from the installroot. When varsdir paths are specified within a command line argument (--setopt=varsdir=<reposdir>) then those path are always relative to the host with no exceptions.
    • The pluginpath and pluginconfpath are relative to the host.

Note: You may also want to use the command-line option --releasever=<release> when creating the installroot, otherwise the $releasever value is taken from the rpmdb within the installroot (and thus it is empty at the time of creation and the transaction will fail). If --releasever=/ is used, the releasever will be detected from the host (/) system. The new installroot path at the time of creation does not contain the repository, releasever and dnf.conf files.

Bestie, that installroot section is dense but it's giving very important. Read it twice, it's cheaper than a failed transaction ๐Ÿ’€

On a modular system, bestie, you're also gonna want to use the --setopt=module_platform_id=<module_platform_name:stream> command-line option when you create the installroot โ€” otherwise the module_platform_id value gets grabbed from the /etc/os-release file inside the installroot (so it's literally empty at creation time, the modular dependency could end up unsatisfied, and module content could get excluded ๐Ÿ˜ญ). Don't let that happen to you.

Installroot examples, because examples are everything:

dnf --installroot=<installroot> --releasever=<release> install system-release

Permanently sets the releasever of the system in the <installroot> directory to <release>. Permanently. Like a tattoo. โœจ

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. Iconic behavior, no notes. ๐Ÿ’…

  • --newpackage โ€” include newpackage relevant packages. Applicable for the install, repoquery, updateinfo, upgrade and offline-upgrade (dnf-plugins-core) commands.
  • --noautoremove โ€” disables removal of dependencies that are no longer used. It sets the clean_requirements_on_remove configuration option to False. Basically "don't clean up after me, I'm not done yet."
  • --nobest โ€” sets the best option to False, so that transactions are not limited to best candidates only. You get the whole menu, not just the chef's special. ๐Ÿ“
  • --nodocs โ€” do not install documentation. Sets the rpm flag 'RPMTRANS_FLAG_NODOCS'. No docs, no problem, we're busy.
  • --nogpgcheck โ€” skip checking GPG signatures on packages (if RPM policy allows). โš ๏ธ Yes, this is exactly as spicy as it sounds.
  • --noplugins โ€” disable all plugins. Every single one. Periodt.
  • --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. Lowkey just "shhh, I know what's happening." ๐Ÿคซ
  • -R <minutes>, --randomwait=<minutes> โ€” maximum command wait time.
  • --refresh โ€” set metadata as expired before running the command. Like clearing your cache before you re-stalk someone's profile. ๐Ÿฆ‹
  • --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. Read that twice, fr fr.
  • --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 either. Same energy, different half of the string. ๐Ÿ’œ
  • --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. Pick a lane, bestie. ๐Ÿซถ
  • --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. Security patch drop, let's go ๐Ÿ”ฅ
  • --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. Sneaky but valid. ๐Ÿ’€
  • --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. It's giving "we move." ๐Ÿ˜Œ
  • --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. It's giving "this never happened" energy. ๐Ÿ™ˆ
  • -v, --verbose โ€” verbose operation, show debug messages. For when you need to know everything.
  • --version โ€” show DNF version and exit.
  • -y, --assumeyes โ€” automatically answer yes for all questions. No thoughts, head empty, just yes. ๐Ÿ‘‘

List options are comma-separated. Command-line options override respective settings from configuration files. That's the rule and honestly it's a good rule.


๐Ÿ’– 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. Bestie, it's a nickname maker for your commands. ๐ŸŒธ

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. DNF said "not today, loop." ๐Ÿ’€

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. Full roster reveal. โœจ
  • 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. That backslash is the main character here, honestly. ๐Ÿ’…

๐ŸŒˆ 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)

See how order matters? Position is everything, iykyk. ๐Ÿ™ˆ

๐Ÿงš 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. It's the cleanup crew your system didn't know it needed. ๐ŸŽ€

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.

Heads up: this command by default does not force a sync of expired metadata. See also Metadata Synchronization. So don't come for it about stale info, bestie.

โญ 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). It's a vibe check for your package database, and yes it will absolutely tell you what's wrong. ๐Ÿ’€

๐ŸŒธ Check-Update Command ๐ŸŒธ

Command: check-update Aliases: check-upgrade

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

Okay so this one is the "do I have updates or not" checker, and it does it without asking you anything โ€” non-interactive, no prompts, no drama. It checks whether updates are available for the packages you name. Leave out <package-file-spec> entirely and it just checks whether anything at all on your system has an update waiting. ๐Ÿ’…

The exit codes here are lowkey iconic and you have to memorise them:

  • 100 โ€” yep, updates available, and it prints you the list ๐Ÿ”ฅ
  • 0 โ€” nope, you're all up to date, slay โœจ
  • 1 โ€” something broke ๐Ÿ˜ญ

Add --changelogs and it also prints the changelog delta of the packages that are about to be updated. Bestie, receipts. ๐Ÿ“œ

โš ๏ธ Real talk though: just because check-update says a newer version exists doesn't mean a later dnf upgrade will actually install it. Not the same thing at all. The difference is that dnf upgrade has restrictions to respect โ€” like package dependencies actually being satisfiable. So don't come for DNF when the upgrade "ignores" your update. It's not ignoring you, it's doing math. ๐Ÿงฎ

Also heads up: the output is affected by the autocheck_running_kernel configuration option. ๐Ÿ‘€


๐Ÿงผ Clean Command ๐Ÿงผ

Command: clean

This is the self-care command fr fr. ๐Ÿ’† It performs cleanup of the temporary files that get kept around for repositories โ€” and that includes all the leftover data from disabled or removed repositories, plus data for different distribution release versions. Basically it sweeps under the bed, including the stuff from three moves ago. ๐Ÿงน

  • dnf clean dbcache โ€” Removes the cache files generated from the repository metadata. This forces DNF to regenerate those cache files the next time it runs. ๐Ÿ”„
  • dnf clean expire-cache โ€” Marks the repository metadata as expired. DNF will re-validate the cache for each repository the next time it's used. โณ
  • dnf clean metadata โ€” Removes the repository metadata itself. Those are the files DNF uses to figure out the remote availability of packages. Use this and DNF will download all the metadata next time it runs. ๐Ÿซ 
  • dnf clean packages โ€” Removes any cached packages from the system. ๐Ÿ“ฆ
  • dnf clean all โ€” Does all of the above. The full reset. The factory settings. The everything shower. ๐Ÿšฟ

๐Ÿ—‚๏ธ Deplist Command ๐Ÿ—‚๏ธ

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

Deprecated alias for dnf repoquery --deplist. That's it, that's the whole thing. It's giving "old account you forgot to deactivate" ๐Ÿ’€ โ€” still works, but the cool kids use repoquery.


๐Ÿ”„ Distro-Sync Command ๐Ÿ”„

Command: distro-sync Aliases: dsync Deprecated aliases: distrosync, distribution-synchronization

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

As necessary, it upgrades, downgrades, or keeps your selected installed packages so they match the latest version available from any enabled repository. Note the "as necessary" โ€” it will absolutely downgrade you if that's what it takes. No loyalty. ๐Ÿ˜ค If you don't give it a package, all installed packages get considered. ๐Ÿ‘‘

See also Configuration Files Replacement Policy.


๐Ÿ“‰ Downgrade Command ๐Ÿ“‰

Command: downgrade Aliases: dg

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

Downgrades the packages you name to the highest installable package of all known lower versions, if that's possible. And if you hand it a version yourself, and that version is lower than the version of the installed package, then it downgrades to that target version. Rollback era. ๐Ÿ•ฐ๏ธ Sometimes you gotta go backwards to go forwards.


๐Ÿ‘ฏ Group Command ๐Ÿ‘ฏ

Command: group Aliases: grp Deprecated aliases: groups, grouplist, groupinstall, groupupdate, groupremove, grouperase, groupinfo

Groups are virtual collections of packages โ€” think of them like a curated playlist instead of buying every song individually. ๐ŸŽง DNF keeps track of the groups you selected ("marked") as installed, and can then manipulate all the packages inside them with simple commands. Main character groupchat energy. ๐Ÿ’…

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

Displays an overview of how many groups are installed and how many are available. Give it a spec and it limits the output to the matching groups. summary is the default groups subcommand, so if you type nothing else, that's what you get. ๐Ÿ“Š

dnf [options] group info <group-spec>

Displays the package lists of a group. It shows you which packages are installed or available from a repository โ€” but only when you use -v. ๐Ÿ”

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

Marks the specified group as installed and installs the packages it contains. Add --with-optional and it also pulls in the group's optional packages. ๐ŸŽ

The rules, spelled out: all Mandatory and Default packages will be installed whenever possible. Conditional packages are installed if they meet their requirement. And if the group is already (partially) installed, the command just installs the missing packages from it. Depending on the value of the obsoletes configuration option, group installation takes obsoletes into account. ๐Ÿง 

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

Lists all matching groups, either among installed ones or available ones. Specify nothing and it lists every known group. --installed and --available narrow down the list you're asking for. ๐Ÿ“

Records are ordered by the display_order tag defined in the comps.xml file. And it'll give you a list of all hidden groups if you use --hidden. It provides group IDs when you use -v or --ids. iykyk ๐Ÿซถ

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

Marks the group as removed, and removes 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's not gonna uninstall your faves just because they were also in a group. ๐Ÿ™ˆ

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

Upgrades the packages from the group, and upgrades the group itself. That second part means installing packages that were added to the group by the distribution, and removing packages that got removed from the group โ€” but only as far as they weren't installed explicitly by the user. Glow-up for the whole squad. โœจ


Groups can also be marked installed or removed without physically manipulating any packages โ€” like, changing the vibe without touching the files:

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

Marks the specified group as installed. No packages will be installed by this command โ€” but after this, the group is considered installed. Just a flag. ๐Ÿšฉ

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

Marks the specified group as removed. No packages will be removed by this command. Also just a flag. ๐Ÿšฉ

See also Configuration Files Replacement Policy.


๐Ÿ†˜ Help Command ๐Ÿ†˜

Command: help

dnf help [<command>]

Displays the help text for all commands. If you give it a command name, it only displays the help for that particular command. The "just tell me about this one thing" button. ๐Ÿซถ


๐Ÿ“œ History Command ๐Ÿ“œ

Command: history Aliases: hist

The history command lets you view what has happened in past transactions and act according to that information โ€” assuming the history_record configuration option is set. It's your DNF browser history but, like, actually useful and not embarrassing. ๐Ÿ˜ญ

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

The default history action: listing information about the given transactions in a table. Each <spec> can be any of:

  • a <transaction-spec>, which specifies a transaction directly,
  • 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, it lists all known transactions. ๐Ÿ—ƒ๏ธ

๐Ÿ“Œ Worth knowing: transient transactions (see --transient) will be listed, even though they don't make persistent changes to files under /usr or to the RPM database. They're in the groupchat even if they never showed up to the party.

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 these 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 the history list output is printed in reverse order. ๐Ÿ”ƒ

dnf history info [<spec>...]

Describes the given transactions. The meaning of <spec> is exactly the same as in the History List Command. When no transaction is specified, it describes what happened during the latest transaction. ๐Ÿ”Ž

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

Repeats the specified transaction. It uses the last transaction (with the highest ID) if more than one transaction for the given <package-file-spec> is found. And if it's not possible to redo some operations due to the current state of RPMDB, it will not redo the transaction. No partial sends. ๐Ÿšซ

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

Replays a transaction stored in the file <filename> by the History Store Command. The replay performs the exact same operations on the packages as in the original transaction, and it returns an error if there are any differences in installed packages or their versions. Precision only. ๐ŸŽฏ See also the Transaction JSON Format specification of the file format.

  • --ignore-installed โ€” Don't check that the installed packages are in the same state as the ones recorded in the transaction. E.g. in case there's an upgrade foo-1.0 -> foo-2.0 stored in the transaction, but there's foo-1.1 installed on the target system. ๐Ÿ™ˆ
  • --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, since the transaction wouldn't be the same. ๐Ÿ˜ค
  • --skip-unavailable โ€” In case some packages stored in the transaction aren't available on the target system, skip them instead of erroring out. ๐Ÿฉน

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

Undoes all transactions performed after the specified transaction. It uses the last transaction (with the highest ID) if more than one transaction for the given <package-file-spec> is found. And if it's not possible to undo some transactions due to the current state of RPMDB, it will not undo any transaction. All or nothing, bestie. ๐Ÿ’…

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

Stores a transaction โ€” the one you point at with <transaction-spec> โ€” so you can replay it later with the History Replay Command. It's giving time capsule vibes ๐ŸŽ€

Warning bestie: the stored transaction format is considered unstable and may change at any time ๐Ÿ˜ญ It will work if the same version of dnf is used to store and replay (or between versions as long as it stays the same).
  • -o <output-file>, --output=<output-file> โ€” stashes the serialized transaction into <output-file>. Default is transaction.json. ๐Ÿ—‚๏ธ
dnf history undo <transaction-spec>|<package-file-spec>

Does the literal opposite of every operation performed in the transaction you specify. If more than one transaction matches the given <package-file-spec>, it uses the last transaction (the one with the highest ID). And heads up โ€” if it's not possible to undo some operations because of the current state of RPMDB, it will not undo the transaction. No partial chaos, no cap ๐Ÿ’…

dnf history userinstalled

Shows all packages installed by user, installed from a group or a module profile, and packages installed outside of DNF. Basically it lists the packages that will stay on your system when the Autoremove Command or Remove Command (along with clean_requirements_on_remove configuration option set to True) is executed. ๐Ÿซถ

Ngl, you can get the same results with dnf repoquery --userinstalled, and honestly the repoquery command is more powerful when it comes to formatting the output. Just saying. โœจ

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. The info command limits the displayed packages the same way as the list command does. ๐Ÿ‘‘

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 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, it's literally right there ๐Ÿซถ) 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 module ate, periodt.

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. 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, and the resulting package is picked simply by lexicographical order. ๐Ÿ˜ญ Not me getting picked by alphabetical order.

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 be not matched with provides and file provides. ๐Ÿ’€

See also Configuration Files Replacement Policy.


๐Ÿฆ‹ Install Examples ๐Ÿฆ‹

dnf install tito

Installs the tito package (tito is the package name). Simple, iconic, no notes.

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

Installs a local rpm file tito-0.6.2-1.fc22.noarch.rpm from the ~/Downloads/ directory. Local file, local slay ๐ŸŽ€

dnf install tito-0.5.6-1.fc22

Installs the package with a specific version. If the package is already installed it will automatically try to downgrade or upgrade to that specific version. Commit to the bit ๐Ÿ’…

dnf --best install tito

Installs the latest available version of the package. If the package is already installed it will try to automatically upgrade to the latest version. And if the latest version of the package cannot be installed, the installation will fail. --best is highkey an overachiever.

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

Installs a package directly from a URL. Copy that whole URL exactly bestie, every slash matters, there's a double slash in there and we respect it ๐Ÿซก

dnf install '@docker'

Installs all default profiles of module docker and their RPMs. Module streams get enabled accordingly. ๐Ÿณ

dnf install '@Web Server'

Installs the Web Server environmental group. Group chat energy fr fr.

dnf install /usr/bin/rpmsign

Installs a package that provides the /usr/bin/rpmsign file. File-path flex ๐Ÿ’–

dnf -y install tito --setopt=install_weak_deps=False

Installs 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.). They're the little extras, the accessories of the package world ๐ŸŽ€

dnf install --advisory=FEDORA-2018-b7b99fe852 \*

Installs 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. No hiding, full transparency ๐Ÿซถ

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. The orphans, the mystery guests ๐Ÿ’€

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 drops ๐Ÿ“

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

Lists upgrades available for the installed packages.

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). Efficiency is the vibe ๐Ÿ˜Œโœจ

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, literally ๐ŸŒฑ


๐Ÿ’œ 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 the Autoremove Command or Remove Command (along with clean_requirements_on_remove configuration option set to True) is executed. Protecting your faves ๐Ÿซถ

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 the 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 the Remove Command if you're not sure whether the package is a requirement of other user installed packages on the system. Safe un-committing, 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. Group protection squad ๐ŸŽ€


๐ŸŒˆ 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>...

Installs 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. Different tool, different job, iykyk.
dnf [options] module update <module-spec>...

Updates 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, main character energy ๐Ÿ‘‘

๐ŸŒ€ module switch-to โ€” the glow-up command

dnf [options] module switch-to <module-spec>...

Okay bestie, this one is a whole moment. It switches to or enables a module stream, changes versions of installed packages to versions provided by the new stream, and removes 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. iconic behavior honestly โœจ

It can also be used as a stronger version of the dnf module install command, but it requires you 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. ๐Ÿ’…


๐Ÿงผ module remove

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

๐Ÿงจ module remove --all

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. No cap. ๐Ÿšซ


โœ… module enable

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. heads up! โš ๏ธ

This command cannot be used for switching module streams. Use the dnf module switch-to command for that. don't try it bestie ๐Ÿ’€

๐Ÿšซ module disable

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.

๐Ÿ”„ module reset

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. fresh start energy ๐ŸŒฑ


๐Ÿ” module provides

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. detective mode activated ๐Ÿ•ต๏ธโ€โ™€๏ธ

๐Ÿ“ฆ module list

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.

โ„น๏ธ module info

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.

๐Ÿ“š module repoquery

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: follow the trail bestie ๐Ÿฆ‹

  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
  1. 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
  1. 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
  1. If this last step also fails, DNF returns "Error: No Matches found". oof, no matches bestie ๐Ÿ˜ญ

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, 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). same package, fresh start ๐ŸŽ€


๐Ÿ—‘๏ธ 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. bye bye dependency clutter ๐Ÿ’…

๐ŸงŸ remove --duplicates

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. conflict era, be careful โš ๏ธ

๐Ÿงน remove --oldinstallonly

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. As a consequence, <spec> will be not matched with provides and file provides. precise queen behavior ๐Ÿ‘‘

๐Ÿงฝ 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).
  • dnf remove --duplicates โ€” Remove older versions of duplicated packages (an equivalent of yum's package-cleanup --cleandups).

๐Ÿ  Repoinfo Command

Command: repoinfo

An alias for the repolist command that provides more detailed information like dnf repolist -v. extra detail, extra slay โœจ


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

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 information about them. It is an equivalent of rpm -q for remote repositories. remote lookup realness ๐Ÿซถ

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>, ...). As a consequence, <spec> will be not matched with file provides. exact match, no guessing ๐ŸŽฏ

๐ŸŽ›๏ธ 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]) 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. architectural main character energy ๐ŸŒˆ
  • --duplicates โ€” narrows the result down to installed duplicate packages, like when you've got more than one version of the same name-and-architecture chilling on your system. Heads up bestie: installonly packages get excluded from this set ๐Ÿ™ˆ
  • --unneeded โ€” narrows the result down to leaf packages that were installed as dependencies and likeโ€ฆ aren't needed anymore? Basically it shows you the packages that are gonna get yeeted after you run the dnf autoremove command ๐Ÿ’…
  • --available โ€” narrows the result to available packages only. This one's set by default, so it's the normie setting fr
  • --disable-modular-filtering โ€” turns OFF the filtering of modular packages, so packages from inactive module streams get included in your result. iconic switch honestly ๐ŸŒธ
  • --extras โ€” narrows the result down to packages that aren't present in any of the available repositories โœจ
  • -f <file>, --file <file> โ€” narrows the result to only the package that owns <file>. iykyk, super handy ๐ŸŽ€
  • --installed โ€” narrows the result to installed packages only. Ngl the exclude option in the config file might influence your result โ€” but if you also pass the command line option --disableexcludes, then it's guaranteed that all installed packages will be listed ๐Ÿซถ
  • --installonly โ€” narrows the result down to installed installonly packages โญ
  • --latest-limit <number> โ€” narrows the result 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 ๐Ÿ‘‘
  • --recent โ€” narrows the result to packages that were recently edited ๐Ÿฆ‹
  • --repo <repoid> โ€” narrows the result to only packages from the repository identified by <repoid>. You can use this multiple times and the effect stacks up (accumulative, bestie) ๐Ÿ”ฅ
  • --unsatisfied โ€” reports unsatisfied dependencies among installed packages, aka missing requires AND existing conflicts ๐Ÿ˜ญ
  • --upgrades โ€” narrows the result to packages that provide an upgrade for some package you already have installed โฌ†๏ธ
  • --userinstalled โ€” narrows the result to packages installed by the user. Same situation as --installed: the exclude option in the config file might influence the result, but if you use the command line option --disableexcludes, it ensures all installed packages get listed ๐Ÿ’–
  • --whatdepends <capability>[,<capability>...] โ€” narrows the result to only packages that require, enhance, recommend, suggest or supplement any of <capabilities>. It's giving "the whole crew" energy ๐ŸŒˆ
  • --whatconflicts <capability>[,<capability>...] โ€” narrows the result to only packages that conflict with any of <capabilities>. drama detector ๐Ÿ’€
  • --whatenhances <capability>[,<capability>...] โ€” narrows the result to only packages that enhance any of <capabilities>. Girl, use --whatdepends if you actually want all the depending packages listed ๐Ÿ’…
  • --whatobsoletes <capability>[,<capability>...] โ€” narrows the result to only packages that obsolete any of <capabilities> ๐ŸŽ€
  • --whatprovides <capability>[,<capability>...] โ€” narrows the result to only packages that provide any of <capabilities> โœจ
  • --whatrecommends <capability>[,<capability>...] โ€” narrows the result to only packages that recommend any of <capabilities>. Again: use --whatdepends if you want all the depending packages listed ๐Ÿซถ
  • --whatrequires <capability>[,<capability>...] โ€” narrows the result to only packages that require any of <capabilities>. And yep, use --whatdepends if you want all the depending packages listed ๐ŸŒธ
  • --whatsuggests <capability>[,<capability>...] โ€” narrows the result to only packages that suggest any of <capabilities>. You already know the drill: --whatdepends for all depending packages ๐Ÿฆ‹
  • --whatsupplements <capability>[,<capability>...] โ€” narrows the result to only packages that supplement any of <capabilities>. And once more for the cheap seats: --whatdepends lists all depending packages โญ
  • --alldeps โ€” this one is stackable with --whatrequires or --whatdepends only. On top of that it adds all packages requiring the package features to the result set. It's used as the default, no cap ๐Ÿ’–
  • --exactdeps โ€” also stackable with --whatrequires or --whatdepends only. It limits the resulting set to only packages that require the <capability> specified by --whatrequires. Precise queen behaviour ๐Ÿ‘‘
  • --srpm โ€” operate on the corresponding source RPM ๐Ÿ”

๐ŸŽ€ Query Options ๐ŸŽ€

This is where you pick what info gets displayed about each package ๐Ÿ’…

Okay so listen: the following are mutually exclusive, meaning at most one can be specified. If you don't give any query option, the matching packages just get displayed in the standard NEVRA notation. Periodt.
  • -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} (yes that's literally how it's written, don't come for me ๐Ÿ˜ญ)
  • --depends โ€” display capabilities that the package depends on, enhances, recommends, suggests or supplements ๐ŸŒˆ
  • --enhances โ€” display capabilities enhanced by the package. Same as --qf "%{enhances}"" (double quote at the end, that's canon, it's in the source fr)
  • --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 these supplementary options: --whatrequires, --requires, --conflicts, --enhances, --suggests, --provides, --supplements, --recommends. It's giving family tree but make it packages ๐ŸŒณ
  • --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 you can change 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}". This one's the default, bestie ๐Ÿ’…
  • --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, your own little art project ๐ŸŽจ <format> is the string that gets output for each matched package, and every occurrence of %{<tag>} inside it gets replaced by the corresponding attribute of the package. Wanna see the list of recognized tags? Run dnf repoquery --querytags and slay ๐Ÿ”ฅ
  • --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) ๐Ÿซถ

๐Ÿ“ Repoquery Examples ๐Ÿ“

Because sometimes you just need to see it in action, yk? ๐Ÿ‘€

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. Note that it accepts only arguments in the "<name>.<arch>" format, so don't get creative ๐Ÿ’…

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 "i686" architecture ๐Ÿ’€

dnf repoquery --duplicates

Display duplicate packages ๐Ÿ‘ฏ

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

Display source packages that require a <provide> for a build ๐Ÿ”จ


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

Command: repository-packages

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

Okay so this command lets you run commands on top of all the packages in the repository named <repoid> ๐Ÿ’– BUT โ€” important caveat, don't skip this โ€” any dependency resolution takes into account packages from all enabled repositories. So it's not a bubble, bestie. 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. Simple as that โœจ

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. Very "no surprises" of it ๐Ÿซถ

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 ๐ŸŒธ

okay so we're still deep in repository-packages territory, and there are so many little subcommands โ€” don't panic, bestie, they're all just variations on a vibe ๐Ÿ’…

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.

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]

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 remove-spec and install 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.

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

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 this is the part where we learn how to point at a package and be like "that one, bestie." ๐Ÿ’… A bunch of commands take a <package-spec> parameter that picks which package the operation is about. And <package-spec> gets matched against package NEVRAs, provides, and file provides โ€” like it's checking every single vibe of the package to find your match.

<package-file-spec> is basically the same thing except it does not do provides matching. So it only gets matched against NEVRAs and file provides. that's it, that's the whole personality.

<package-name-spec> is even more exclusive โ€” matched against NEVRAs only. minimal queen. ๐Ÿ‘‘

๐ŸŒˆ Globs

Package specification supports the exact same glob pattern matching that your shell does, and it uses it across all three of the things we just mentioned (NEVRAs, provides and file provides). so yeah, you can be fuzzy about it โœจ

The patterns it supports are:

  • * โ€” matches any number of characters. the wildcard of the group chat.
  • ? โ€” matches any single character. one (1) character energy.
  • [] โ€” 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. chaotic but iconic.
note bestie ๐Ÿ“Œ: 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. so likeโ€ฆ don't expect it to magically know what you meant. ๐Ÿ˜ญ

๐Ÿฆ‹ NEVRA Matching

when matching against NEVRAs, partial matching is supported โ€” dnf will try to match your 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

and ngl, name can in general contain dashes (e.g. package-with-dashes), so don't let the dashes jump-scare you. ๐Ÿ’€

the first form that matches any packages is used, and the remaining forms are not tried. periodt. but if none of the forms match any packages, an attempt is made to match the <package-spec> against full package NEVRAs โ€” and this is only relevant if globs are present in the <package-spec>.

<package-spec> matches NEVRAs the same way <package-name-spec> does, but if matching NEVRAs fails, it also attempts to match against provides and file provides of packages. it's giving "I have a backup plan" ๐Ÿ’–

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). BUT โ€” in that case you need to write the spec to match against full package NEVRAs, because it is not possible to split such a spec into NEVRA forms. the rules are the rules bestie ๐Ÿคทโ€โ™€๏ธ

๐ŸŽ€ Specifying NEVRA Matching Explicitly

some commands (autoremove, install, remove and repoquery) also have aliases with suffixes -n, -na and -nevra that let you explicitly say how to parse the arguments. be direct! communicate! ๐Ÿ’…

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

๐Ÿ’– SPECIFYING PROVIDES ๐Ÿ’–

<provide-spec> in command descriptions means the command operates on packages providing the given spec. this can 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. lowercase girlies stay winning ๐Ÿซถ

๐ŸŒธ Specifying File Provides

if a spec starts with either / or */, it's considered a potential file provide. that's the whole rule, slay.


โญ 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) that gets matched against a group's ID, canonical name, and name translated into the current LC_MESSAGES locale (if possible). multilingual icon behavior ๐ŸŒˆ


๐Ÿงš SPECIFYING MODULES ๐Ÿงš

<module-spec> lets you select modules or profiles that a particular operation should work on. it's in the form of NAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE and the supported partial forms are:

  • 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. and in case profile is not specified, the system default profile or the 'default' profile is used. defaults will always come through for you ๐Ÿ’œ


๐Ÿ”ฅ 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. history but make it math ๐ŸŽ€


๐Ÿ‘‘ PACKAGE FILTERING ๐Ÿ‘‘

Package filtering filters packages out of the available package set, making them invisible to most dnf commands. they cannot be used in a transaction. so they're not blocked, they're justโ€ฆ not invited to the party ๐Ÿ™ˆ 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. and 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. (go read it, bestie, it's giving homework but make it lore.)

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. like, actually broken. ๐Ÿ˜ญ to disable modular filtering for a particular repository, specify module_hotfixes=true in the .repo file or use --setopt=<repo_id>.module_hotfixes=true.

and to discover the module which contains an excluded package, use dnf module provides. detective mode activated ๐Ÿ”


โญ 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 operation considerably slows it down and costs bandwidth for both the client and the repository provider. so, like, we gotta be chill about it.

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. and it is crucial that repository providers set the option well โ€” namely to a value where it's 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. that's the contract, bestie, honor it ๐Ÿค

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. and note that in all situations the user can force synchronization of all enabled repositories with the --refresh switch. you always have the power ๐Ÿ’…โœจ


๐ŸŽ€ 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 the packaging guideline. so don't come for dnf about it, okay? it's not their call ๐Ÿ™ˆ


๐Ÿฆ‹ 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. (go stan them, they wrote this ๐Ÿ’–)

2012-2020, Red Hat, Licensed under GPLv2+


and that's a wrap on the whole page, bestie!! ๐ŸŽ‰ you officially read an entire manpage, main character energy fr fr. this one's version 4.23.0, dated Mar 19, 2025 โ€” so like, write that down if you're citing it, iykyk ๐Ÿซถโœจ๐Ÿ’…

๐Ÿ“ฆ where this page comes from