DNF5(8)

๐Ÿ’– DNF5 โ€” the manual page, but make it slay ๐Ÿ’–

okay bestie, welcome to dnf5, the manual page for the package manager utility. this is the dnf5(8) page, and yes it's long, so hydrate, sit pretty, and let's go. ๐Ÿซถ


โœจ NAME โœจ

dnf5 โ€” DNF5 Package Management Utility. that's the whole vibe. she manages packages. ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

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

so like: command first, then options, then args. in that order, bestie, in that order. โญ


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

DNF5 is the new version of DNF โ€” a package manager for RPM-based Linux distributions. she's been completely rewritten in C++, and the whole point of the glow-up is better performance and fewer external dependencies. it's giving main character energy, no cap. โœจ

both of those are links in the original (github.com/rpm-software-management/dnf5/ and github.com/rpm-software-management/dnf/), just so you know where she lives. ๐Ÿ 


๐Ÿ‘‘ COMMANDS ๐Ÿ‘‘

here's the full list of available commands. for the deets on any one of them, go read the separate man page for that specific command โ€” like man dnf5 install. iykyk. ๐Ÿ’œ

  • advisory โ€” manage advisories.
  • autoremove โ€” remove unneeded packages.
  • check โ€” check for problems in the package database.
  • check-upgrade โ€” check for available package upgrades.
  • clean โ€” remove or invalidate cached data.
  • distro-sync โ€” upgrade or downgrade installed packages to the latest available version.
  • downgrade โ€” downgrade packages.
  • download โ€” download packages.
  • environment โ€” manage comps environments.
  • group โ€” manage comps groups.
  • history โ€” manage transaction history.
  • info โ€” provide detailed information about installed or available packages.
  • install โ€” install packages. yes queen. ๐Ÿ“ฆ
  • leaves โ€” list groups of leaf packages.
  • list โ€” list installed or available packages.
  • makecache โ€” generate the metadata cache.
  • mark โ€” change the reason of an installed package.
  • module โ€” manage modules.
  • offline โ€” manage offline transactions.
  • provides โ€” find what package provides the given value.
  • reinstall โ€” reinstall packages.
  • remove โ€” remove packages.
  • replay โ€” replay stored transactions.
  • repo โ€” manage repositories.
  • repoquery โ€” search for packages in repositories.
  • search โ€” search for packages using keywords.
  • status โ€” display summary statistics about installed and available packages, groups and repositories.
  • swap โ€” remove software and install another in the single transaction.
  • system-upgrade โ€” upgrade the system to a new major release.
  • upgrade โ€” upgrade packages.
  • versionlock โ€” protect packages from updates to newer versions.

๐Ÿงš Plugin commands ๐Ÿงš

and here's the list of commands that are available as plugins. these only show up once you've installed the dnf5-plugins package, so if they're ghosting you, that's why. ๐Ÿ‘ป

  • automatic โ€” alternative CLI to dnf upgrade, suitable to be executed automatically and regularly from systemd timers, cron jobs and similar.
  • builddep โ€” install missing dependencies for building an RPM package.
  • changelog โ€” show package changelogs.
  • config-manager โ€” manages main configuration, repositories configuration, and variables.
  • copr โ€” manage Copr repositories (add-ons provided by users/community/third-party).
  • needs-restarting โ€” determine whether the system should be rebooted.
  • repoclosure โ€” display a list of unresolved dependencies for repositories.
  • reposync โ€” synchronize packages and metadata of a remote DNF repository to a local directory.

okay that's part 1 bestie, hold on, there's more coming. don't go anywhere ๐Ÿ’œ

โœจ OPTIONS โœจ

Okay bestie, these are the options that work everywhere โ€” like, in the general context of literally any dnf5 command. Universal queens only ๐Ÿ’…

  • --assumeno โ€” Just auto-answers no to everything. Every single question. No takesies backsies.
  • --allow-vendor-change โ€” Lets RPM upgrades or downgrades automatically swap packages in from different vendors. Yes, even then.
  • --best โ€” Tries to use 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 DNF5 to only consider the latest packages. When running into packages with broken dependencies, DNF5 will fail giving the 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 it's giving "best effort", not "best guarantee", iykyk)

  • -C, --cacheonly โ€” Only uses cached data for working with packages and repository metadata. The cache won't be updated, even if it is expired. It's giving "I already have what I have, don't @ me".
  • --comment=COMMENT โ€” Drops a comment into the transaction history. Little diary entry, main character energy ๐Ÿ“
  • --config=CONFIG_FILE_PATH โ€” Defines where the configuration file lives.
  • --debugsolver โ€” Dumps extra solver data for debugging purposes. The data gets saved in ./debugdata. Detective mode ๐Ÿ”
  • --disable-plugin=PLUGIN_NAME,... โ€” Disables the specified libdnf5 library plugins for the purpose of the current DNF5 command. This is a list option which can be specified multiple times. Accepted values are names, or a glob of names.
  • --disable-repo=REPO_ID,... โ€” Temporarily disables active repositories for the purpose of the current DNF5 command. This is a list option which can be specified multiple times. Accepted values are ids, or a glob of ids.
  • --dump-main-config โ€” Prints main configuration values to stdout.
  • --dump-repo-config=REPO_ID,... โ€” Prints repository configuration values to stdout. This is a list option which can be specified multiple times. Accepted values are ids, or a glob of ids.
  • --dump-variables โ€” Prints variable values to stdout.
  • --enable-plugin=PLUGIN_NAME,... โ€” Enables the specified libdnf5 library plugins for the purpose of the current DNF5 command. This is a list option which can be specified multiple times. Accepted values are names, or a glob of names.
  • --enable-repo=REPO_ID,... โ€” Temporarily enables additional repositories for the purpose of the current DNF5 command. This is a list option which can be specified multiple times. Accepted values are ids, or a glob of ids.
  • --forcearch=ARCH โ€” Forces the use of a specific architecture. See <#forcearch-misc-ref-label> dnf5-forcearch(7) for more info.
  • -h, --help โ€” Shows the help. Our beloved ๐Ÿซถ
  • --installroot=ABSOLUTE_PATH โ€” Sets up the installroot path. An absolute path is required. See <#installroot-misc-ref-label> dnf5-installroot(7) for more info.
  • --no-allow-vendor-change โ€” Does not allow automatic package replacements from different vendors for RPM upgrades or downgrades. The behavior of this option can be fine-tuned with vendor change policy configuration. See dnf5.conf-vendorpolicy(5) for more info.
  • --no-best โ€” Does not limit the transaction to the best candidates only. The opposite twin of --best ๐Ÿ’€
  • --no-docs โ€” Does not install any files that are marked as a documentation (which includes man pages and texinfo documents). It sets the RPMTRANS_FLAG_NODOCS flag.
  • --no-gpgchecks โ€” Skips checking OpenPGP signatures on packages (if RPM policy allows that).
  • --no-plugins โ€” Disables all libdnf5 plugins.
  • -q, --quiet โ€” In combination with a non-interactive command, shows just the relevant content. Suppresses messages notifying about the current state or actions of DNF5. Shhh ๐Ÿคซ
  • --refresh โ€” Forces refreshing metadata before running the command.
  • --color=<color> โ€” Controls whether color is used in terminal output. Valid values are always, never and auto (default). Aesthetic choices are valid ๐Ÿ’…
  • --repo=REPO_ID,... โ€” Enables just the specified repositories. This is a list option which can be specified multiple times. Accepted values are ids, or a glob of ids.
  • --repofrompath=REPO_ID,REPO_PATH โ€” Specifies a repository to add to the repositories only for this run. Can be used multiple times.

The new repository id is specified by REPO_ID and its baseurl by REPO_PATH. Variables in both values are substituted before creating the repo.

The configuration of the new repository can be adjusted using options --setopt=REPO_ID.option=value.

If you want only packages from this repository to be available, combine this option with --repo=REPO_ID switch. (one-time pop-up repo, iconic)

  • --releasever=RELEASEVER โ€” Overrides the value of the distribution release (the releasever variable) in configuration files. This can affect cache paths, values in configuration files and mirrorlist URLs. Whenever releasever is set, releasever_major and releasever_minor will also be set by splitting releasever on the first ..
  • --releasever-major=RELEASEVER_MAJOR โ€” Overrides the releasever_major variable, which is usually automatically detected or taken from the part of $releasever before the first .. Does not affect the setting of the releasever variable. Must be specified after --releasever on the command line, otherwise the major part of the --releasever will take precedent.
  • --releasever-minor=RELEASEVER_MINOR โ€” Overrides the releasever_minor variable, which is usually automatically detected or taken from the part of $releasever after the first .. Does not affect the setting of the releasever variable. Must be specified after --releasever on the command line, otherwise the minor part of the --releasever will take precedent.
  • --setopt=[REPO_ID.]OPTION=VALUE โ€” Overrides a configuration option from the configuration file. The REPO_ID parameter is used to override options for repositories.

Values for the 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.

  • --setvar=VAR_NAME=VALUE โ€” Overrides a DNF5 variable value, like arch, releasever, etc.
  • --skip-file-locks โ€” Skips acquiring file locks, such as the lock on the system repository. See skip_system_repo_lock <#skip-system-repo-lock-options-label> for more info.
  • --show-new-leaves โ€” Shows newly installed leaf packages and packages that became leaves after a transaction. ๐Ÿƒ
  • --use-host-config โ€” Uses configuration files and variable definitions from the host system rather than the installroot. See <#installroot-misc-ref-label> dnf5-installroot(7) for more info.
  • --version โ€” Displays the version of the dnf5 application and libdnf5 library, along with successfully loaded plugins and their versions, and then exits.
  • -y, --assumeyes โ€” Automatically answers yes for all questions. The chaotic counterpart to --assumeno ๐Ÿ˜ญ
  • -x PACKAGE-SPEC-N,..., --exclude=PACKAGE-SPEC-N,... โ€” Excludes packages specified in PACKAGE-SPEC-N arguments from the transaction. This is a list option.

๐Ÿšง SPECIAL ARGUMENTS ๐Ÿšง

  • -- โ€” Stops parsing command line options. All remaining arguments will be treated as positional arguments. (the "okay we're done with flags now" line)

๐Ÿ”„ METADATA SYNCHRONIZATION ๐Ÿ”„

Correct operation of DNF5 depends on having an access to up-to-date data from the all enabled repositories, but contacting remote mirrors on every operation considerably slows it down and costs bandwidth for both the client and the repository provider. The metadata_expire repository configuration option is used by DNF5 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. (fr fr, set it properly or everything falls apart)

To further reduce the bandwidth load, some of the commands where having up-to-date metadata is not critical (e.g. the group 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.

Refer to the <#caching-misc-ref-label> dnf5-caching(7) for more info regarding metadata and packages caching.


๐Ÿ—‚๏ธ 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 additional suffix to the origin name. Which file should maintain the true name after transaction is not controlled by package manager, but is specified by each package itself, following packaging guideline.

Bestie, read that twice. The package manager is not the one deciding who keeps the real name here โ€” the package itself is. ๐Ÿ‘‘

๐Ÿšช EXIT CODES ๐Ÿšช

The dnf5 command in general exits with the following return values:

  1. 0 โ€” Operation was successful. ๐ŸŽ‰ slay.
  2. 1 โ€” An error occurred during processing of the command.
  3. 2 โ€” An error occurred during parsing the arguments.

Other exit codes could be returned by the specific command itself, see its documentation for more info.


๐Ÿ“ FILES ๐Ÿ“

Cache Files

/var/cache/libdnf5/

Main Configuration

/etc/dnf/dnf.conf

Repository Configuration

/etc/yum.repos.d/

Repository Persistence

/var/lib/dnf/

System State

/usr/lib/sysimage/libdnf5/

๐ŸŒˆ ENVIRONMENT ๐ŸŒˆ

okay bestie final stretch, stay with me ๐Ÿ’– dnf5 lowkey reads a whole lil family of environment variables and they can absolutely change the vibe of your run. here's the full roster, no cap:

  • DNF5_FORCE_COLUMNS โ€” this one overrides the terminal width that gets used for rendering progress bars and other tabular data. the value should be a positive integer. if it's unset or invalid, the width gets detected from the terminal device connected to standard output. and if that detection fails? 80 columns gets assumed. slay.
  • DNF5_FORCE_INTERACTIVE โ€” overrides the interactivity of the connected standard input/output. set it to 0 to pretend the input/output isn't connected to an interactive terminal, which means DNF5 should not ask any questions. set it to 1 to force DNF5 to ask questions even if the terminal is non-interactive. related energy: the --assumeno and --assumeyes options.
  • DNF5_PLUGINS_DIR โ€” overrides the directory that holds DNF5 application plugins. set it to an empty string to disable loading the application plugins entirely. bye plugins ๐Ÿ’€
  • LIBDNF_PLUGINS_CONFIG_DIR โ€” overrides the directory holding libdnf5 plugin's configuration files. ๐ŸŽ€
  • SOURCE_DATE_EPOCH โ€” specifies a timestamp given as a number of seconds since the UNIX epoch. when it's set, transaction timestamps in the history database get set to the specified time instead of the current time. additionally, packages are ordered to ensure consistent transaction order. reproducible-core fr fr โœจ
  • TEMP, TEMPDIR, TMP, TMPDIR โ€” override a path to a directory for temporary files. heads up: the directory must exist. the default value is /tmp.

๐Ÿ‘€ SEE ALSO ๐Ÿ‘€

so many friends, so many man pages. go read them, iykyk ๐Ÿซถ

Commands

Application Plugins

Library Plugins

Configuration

Miscellaneous

Project homepage


๐ŸŒธ Author ๐ŸŒธ

See AUTHORS.md in dnf5 source distribution. (yes queen, the whole list lives over there ๐Ÿ‘‘)

Contributors to the dnf5 project.


and that's the whole page bestie, you made it to the end ๐Ÿฆ‹โœจ this edition is from Sep 24, 2026 and it's the DNF5(8) manual โ€” go forth and dnf5 responsibly, you absolute icon ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from