DNF5(8)

NAME
dnf5 - DNF5 Package Management Utility

SYNOPSIS

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

DESCRIPTION

DNF5 <https://github.com/rpm-software-management/dnf5/> is the new version of DNF <https://github.com/rpm-software-management/dnf/>, a package manager for RPM-based Linux distributions. It has been completely rewritten in C++ aiming for better performance and reducing external dependencies.

COMMANDS

Here is the list of the available commands. For more details see the separate man page for the specific command, f.e. man dnf5 install.

advisory <#advisory-command-ref-label>
    Manage advisories.

autoremove <#autoremove-command-ref-label>
    Remove unneeded packages.

check <#check-command-ref-label>
    Check for problems in the package database.

check-upgrade <#check-upgrade-command-ref-label>
    Check for available package upgrades.

clean <#clean-command-ref-label>
    Remove or invalidate cached data.

distro-sync <#distro-sync-command-ref-label>
    Upgrade or downgrade installed packages to the latest available version.

downgrade <#downgrade-command-ref-label>
    Downgrade packages.

download <#download-command-ref-label>
    Download packages.

environment <#environment-command-ref-label>
    Manage comps environments.

group <#group-command-ref-label>
    Manage comps groups.

history <#history-command-ref-label>
    Manage transaction history.

info <#info-command-ref-label>
    Provide detailed information about installed or available packages.

install <#install-command-ref-label>
    Install packages.

leaves <#leaves-command-ref-label>
    List groups of leaf packages.

list <#list-command-ref-label>
    List installed or available packages.

makecache <#makecache-command-ref-label>
    Generate the metadata cache.

mark <#mark-command-ref-label>
    Change the reason of an installed package.

module <#module-command-ref-label>
    Manage modules.

offline <#offline-command-ref-label>
    Manage offline transactions.

provides <#provides-command-ref-label>
    Find what package provides the given value.

reinstall <#reinstall-command-ref-label>
    Reinstall packages.

remove <#remove-command-ref-label>
    Remove packages.

replay <#replay-command-ref-label>
    Replay stored transactions.

repo <#repo-command-ref-label>
    Manage repositories.

repoquery <#repoquery-command-ref-label>
    Search for packages in repositories.

search <#search-command-ref-label>
    Search for packages using keywords.

swap <#swap-command-ref-label>
    Remove software and install another in the single transaction.

system-upgrade <#system-upgrade-command-ref-label>
    Upgrade the system to a new major release.

upgrade <#upgrade-command-ref-label>
    Upgrade packages.

versionlock <#versionlock-command-ref-label>
    Protect packages from updates to newer versions.

  Plugin commands

Here is the list of the commands available as plugins. These are available after installing the dnf5-plugins package.

automatic <#automatic-plugin-ref-label>
    Alternative CLI to dnf upgrade suitable to be executed automatically and regularly from systemd timers, cron jobs and similar.

builddep <#builddep-plugin-ref-label>
    Install missing dependencies for building an RPM package.

changelog <#changelog-plugin-ref-label>
    Show package changelogs.

config-manager <#config-manager-plugin-ref-label>
    Manages main configuration, repositories configuration, and variables.

copr <#copr-plugin-ref-label>
    Manage Copr repositories (add-ons provided by users/community/third-party).

needs-restarting <#needs-restarting-plugin-ref-label>
    Determine whether the system should be rebooted.

repoclosure <#repoclosure-plugin-ref-label>
    Display a list of unresolved dependencies for repositories.

reposync <#reposync-plugin-ref-label>
    Synchronize packages and metadata of a remote DNF repository to a local directory.

OPTIONS

Following options are applicable in the general context for any dnf5 command:

--assumeno
    Automatically answer no for all questions.

--allow-vendor-change
    Allow automatic package replacements from different vendors for RPM upgrades or downgrades.

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

-C, --cacheonly
    Use only cached data for working with packages and repository metadata.
    Cache won't be updated, even if it is expired.

--comment=COMMENT
    Add a comment to the transaction history.

--config=CONFIG_FILE_PATH
    Define configuration file location.

--debugsolver
    Dump additional data from solver for debugging purposes.
    Data are saved in ./debugdata.

--disable-plugin=PLUGIN_NAME,...
    Disable 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 disable 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
    Print main configuration values to stdout.

--dump-repo-config=REPO_ID,...
    Print 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
    Print variable values to stdout.

--enable-plugin=PLUGIN_NAME,...
    Enable 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 enable 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
    Force the use of a specific architecture.
    See <#forcearch-misc-ref-label> dnf5-forcearch(7) for more info.

-h, --help
    Show the help.

--installroot=ABSOLUTE_PATH
    Setup installroot path.
    Absolute path is required.
    See <#installroot-misc-ref-label> dnf5-installroot(7) for more info.

--no-allow-vendor-change
    Do 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
    Do not limit the transaction to the best candidates only.

--no-docs
    Do 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
    Skip checking OpenPGP signatures on packages (if RPM policy allows that).

--no-plugins
    Disable 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.

--refresh
    Force refreshing metadata before running the command.

--color=<color>
    Control whether color is used in terminal output. Valid values are always, never and auto (default).

--repo=REPO_ID,...
    Enable just 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
    Specify 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.

--releasever=RELEASEVER
    Override 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
    Override 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
    Override 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
    Override 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
    Override a DNF5 variable value, like arch, releasever, etc.

--skip-file-locks
    Skip 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
    Show newly installed leaf packages and packages that became leaves after a transaction.

--use-host-config
    Use 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
    Display the version of the dnf5 application and libdnf5 library, along with successfully loaded plugins and their versions, and then exit.

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

-x PACKAGE-SPEC-N,..., --exclude=PACKAGE-SPEC-N,...
    Exclude packages specified in PACKAGE-SPEC-N arguments from the transaction.
    This is a list option.

SPECIAL ARGUMENTS

--
    Stop parsing command line options. All remaining arguments will be treated as positional arguments.

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.

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.

EXIT CODES

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

0
    Operation was successful.

1
    An error occurred during processing of the command.

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

DNF5_FORCE_COLUMNS
    Override a terminal width used for rendering progress bars and other tabular data. The value should be a positive integer. If it is unset or invalid, the width will be detected from a terminal device connected to the standard output. If the detection fails, 80 columns will be assumed.

DNF5_FORCE_INTERACTIVE
    Override interactivity of the connected standard input/output. Set to 0 to pretend that the input/output is not connected to an interactive terminal and DNF5 should not ask any questions. Set to 1 to force DNF5 to ask questions even if the terminal is non-interactive. See --assumeno and --assumeyes options.

DNF5_PLUGINS_DIR
    Override a directory with DNF5 application plugins. Set it to an empty string to disable loading the application plugins.

LIBDNF_PLUGINS_CONFIG_DIR
    Override a directory with libdnf5 plugin's configuration files.

SOURCE_DATE_EPOCH
    Specifies a timestamp given as number of seconds since UNIX epoch. When set, transaction timestamps in the history database are set to the specified time instead of the current time. Additionally, packages are ordered to ensure consistent transaction order.

    TEMP, TEMPDIR, TMP, TMPDIR Override a path to a directory for temporary files. The directory must exist. Default value is /tmp.

SEE ALSO

Commands:
    dnf5-advisory(8), Advisory command <#advisory-command-ref-label>
    dnf5-autoremove(8), Autoremove command <#autoremove-command-ref-label>
    dnf5-check(8), Check command <#check-command-ref-label>
    dnf5-check-upgrade(8), Check-Upgrade command <#check-upgrade-command-ref-label>
    dnf5-clean(8), Clean command <#clean-command-ref-label>
    dnf5-distro-sync(8), Distro-Sync command <#distro-sync-command-ref-label>
    dnf5-downgrade(8), Downgrade command <#downgrade-command-ref-label>
    dnf5-download(8), Download command <#download-command-ref-label>
    dnf5-environment(8), Environment command <#environment-command-ref-label>
    dnf5-group(8), Group command <#group-command-ref-label>
    dnf5-history(8), History command, <#history-command-ref-label>
    dnf5-info(8), Info command <#info-command-ref-label>
    dnf5-install(8), Install command <#install-command-ref-label>
    dnf5-leaves(8), Leaves command <#leaves-command-ref-label>
    dnf5-list(8), List command <#list-command-ref-label>
    dnf5-makecache(8), Makecache command <#makecache-command-ref-label>
    dnf5-mark(8), Mark command <#mark-command-ref-label>
    dnf5-module(8), Module command <#module-command-ref-label>
    dnf5-offline(8), Offline command <#offline-command-ref-label>
    dnf5-provides(8), Provides command <#provides-command-ref-label>
    dnf5-reinstall(8), Reinstall command <#reinstall-command-ref-label>
    dnf5-remove(8), Remove command <#remove-command-ref-label>
    dnf5-repo(8), Repo command <#repo-command-ref-label>
    dnf5-repoquery(8), Repoquery command <#repoquery-command-ref-label>
    dnf5-search(8), Search command <#search-command-ref-label>
    dnf5-swap(8), Swap command <#swap-command-ref-label>
    dnf5-system-upgrade(8), System-Upgrade command <#system-upgrade-command-ref-label>
    dnf5-upgrade(8), Upgrade command <#upgrade-command-ref-label>
    dnf5-versionlock(8), Versionlock command <#versionlock-command-ref-label>

Application Plugins:
    dnf5-automatic(8), Automatic command <#automatic-plugin-ref-label>
    dnf5-builddep(8), Builddep command <#builddep-plugin-ref-label>
    dnf5-changelog(8), Changelog command <#changelog-plugin-ref-label>
    dnf5-config-manager(8), Config-manager command <#config-manager-plugin-ref-label>
    dnf5-copr(8), Copr command <#copr-plugin-ref-label>
    dnf5-needs-restarting(8), Needs-Restarting command <#needs-restarting-plugin-ref-label>
    dnf5-repoclosure(8), Repoclosure command <#repoclosure-plugin-ref-label>
    dnf5-repomanage(8), Repomanage command <#repomanage-plugin-ref-label>
    dnf5-reposync(8), Reposync command <#reposync-plugin-ref-label>

Library Plugins:
    libdnf5-actions(8), Actions plugin <#actions-plugin-ref-label>
    libdnf5-expired-pgp-keys(8), Expired PGP keys plugin <#expired-pgp-keys-plugin-ref-label>
    libdnf5-local(8), Local plugin <#local-plugin-ref-label>

Configuration:
    dnf5.conf(5), DNF5 Configuration Reference <#dnf5-conf-label>
    dnf5.conf-vendorpolicy(5), DNF5 Vendor Change Policy File Reference

Miscellaneous:
    dnf5-aliases(7), Aliases for command line arguments <#aliases-misc-ref-label>
    dnf5-caching(7), Caching <#caching-misc-ref-label>
    dnf5-comps(7), Comps groups and environments <#comps-misc-ref-label>
    dnf5-filtering(7), Packages filtering, <#filtering-misc-ref-label>
    dnf5-forcearch(7), Forcearch parameter <#forcearch-misc-ref-label>
    dnf5-installroot(7), Installroot parameter <#installroot-misc-ref-label>
    dnf5-modularity(7), Modularity overview, <#modularity-misc-ref-label>
    dnf5-specs(7), Patterns specification <#specs-misc-ref-label>
    dnf5-system-state(7), System state <#systemstate-misc-ref-label>

Project homepage:
    <https://github.com/rpm-software-management/dnf5>

Author
See AUTHORS.md in dnf5 source distribution.

Copyright
Contributors to the dnf5 project.