DNF5-CHANGES-FROM-DNF4(7)

πŸ’– NAME πŸ’–

dnf5-changes-from-dnf4 β€” Changes from the DNF4

okay bestie, welcome to DNF5-CHANGES-FROM-DNF4(7). this chapter is literally the whole differences between DNF5 (at https://github.com/rpm-software-management/dnf5) and DNF (at https://github.com/rpm-software-management/dnf). no cap, it's giving "glow-up documentation" energy.


πŸ’… CHANGES ON THE CLI πŸ’…

✨ Options ✨

πŸ‘‘ Global options scoping πŸ‘‘

Some options were trying to be everywhere, but if they cannot be applied to all commands β€” or they may be applicable but have no effect β€” they got removed from the general options and implemented only for related commands. it's giving niche, and honestly? iconic.

Examples: --best, --no-best are only relevant to several transaction commands.

Options renaming

Boolean options got renamed into these formats:

  • --<option> and --no-<option>
  • --enable-<option> and --disable-<option>

The options with original names are retained for now as compatibility aliases, so your old faves aren't fully gone yet.

Examples: --best and --no-best.

Strict behavior

  • Options --disable-repo=REPO_ID and --setopt=[REPO_ID.]OPTION=VALUE now consistently result in an error when provided with an invalid REPO_ID.
  • The behavior is now aligned with the --repo=REPO_ID and --enable-repo=REPO_ID.
  • The strict configuration option is no longer considered, see the strict option deprecation for more information.
bestie, invalid REPO_ID is not the vibe anymore. it errors. periodt.

No value separator after short options

Short options do not have a separator between the option name and the option value. E.g. dnf -x package is equivalent to dnf --exclude package and dnf --exclude=package long forms. But dnf -x=package means dnf --exclude =package.

read that twice, bestie. the = does not separate short option names from values.

Changes to individual options

  • -4/-6 β€” Dropped. Now only the ip_resolve configuration option is available.
  • --disableexcludes and --disableexcludepkgs β€” Dropped. Now only the disable_excludes configuration option is available.
  • --disable, --enable β€” Dropped along with the previously existing alternatives --set-disabled and --set-enabled.
    • Currently, this can only be achieved through the config-manager plugin (anchor: #config-manager-plugin-ref-label).
      • For example, to disable the fedora repository: dnf config-manager setopt fedora.enabled=0.
  • --downloaddir β€” Dropped. Now only the --destdir is used for the download command.
    • When downloading packages using the system-upgrade or offline command, the target path construction now utilizes the configured installroot and cachedir options.
  • -e, --errorlevel β€” Both the --errorlevel option and errorlevel configuration option are dropped.
  • --help-cmd β€” Dropped. Now only the -h or --help options are available.
  • --installroot β€” New behavior introduced to define from which place the configuration and variables are loaded.
    • See the installroot documentation (anchor: #installroot-misc-ref-label) for more information.
  • --noautoremove β€” Applicable only for the remove command now. As a workaround for other commands, you can use --setopt=clean_requirements_on_remove=False.
  • --obsoletes β€” Dropped. Now only the obsoletes configuration option is available.
  • -R, --randomwait β€” Dropped.
  • --rpmverbosity β€” Dropped. Now only the rpmverbosity configuration option is available.
  • --sec-severity β€” Renamed to --advisory-severities.
  • -v, --verbose β€” Not implemented at present. May be added for specific commands in the future.
  • --version β€” Behavior is different now. See the main man page (anchor: #version-option-ref-label) for more details.

Newly introduced options

and now the new kids on the block, the options that got introduced:

  • --allow-downgrade
    • Along with --no-allow-downgrade, these options enable/disable the downgrade of dependencies when resolving transactions.
    • New respective configuration options have also been created.
    • Applicable to install, upgrade, and related commands.
  • --dump-main-config
    • Along with related --dump-repo-config=REPO_ID, these are new options to print configuration values on the standard output.
  • --from-repo
    • Packages (or their provides) explicitly specified on the command line will only be looked up in the specified repositories. These repositories are automatically enabled.
    • Dependencies of the specified packages can be resolved from any enabled repository.
    • Applicable to install, upgrade, distro-sync, reinstall, downgrade, download, swap, do, and related commands.
  • --installed-from-repo
    • Filters installed packages by the ID of the repository they were installed from.
    • Applicable to remove, upgrade, distro-sync, reinstall, downgrade, list, info, repoquery, and related commands.
  • --offline
    • Store the transaction to be performed offline.
    • Applicable to all relevant transactional commands.
    • See the Offline command (anchor: #offline-command-ref-label) for more information.
  • --show-new-leaves
    • Show newly installed leaf packages and packages that became leaves after a transaction.
  • --skip-unavailable
    • Allow skipping packages that are not available in repositories.
    • Not to be confused with the skip_if_unavailable configuration option (anchor: #skip-if-unavailable-options-label).
    • Applicable to install, upgrade, and related commands.
    • See also the strict option deprecation for more information.
  • --use-host-config
    • See the main man page (anchor: #use-host-config-option-ref-label) for more details.

✨ Commands ✨

Optional subcommands

Commands cannot have optional subcommands. Optional subcommands were ambiguous, making it unclear whether the input was intended as a command argument or a subcommand. Subcommands are now mandatory if present.

Examples:

  • Before: dnf history <transaction ID> Now: dnf history info <transaction ID>
  • Before: dnf updateinfo Now: dnf updateinfo summary

Changes to individual commands

  • alias
    • Dropped. The command has been replaced by a different functionality.
    • See the Aliases for command line arguments (anchor: #aliases-misc-ref-label) for more information.
  • automatic
    • Now a DNF5 plugin.
    • The specific systemd units, dnf-automatic-download, dnf-automatic-install, and dnf-automatic-notifyonly, have been dropped. Only one dnf5-automatic timer is shipped.
    • The emitters.send_error_messages config option has been dropped. DNF5 automatic always informs the user about failed operations using configured emitters.
    • See the Automatic command (anchor: #automatic-plugin-ref-label) for more information.
  • autoremove
    • Dropped the <spec> positional argument since the use case is sufficiently covered by the remove command.
    • Specific variants of the command, autoremove-n, autoremove-na, and autoremove-nevra, are not supported anymore.
  • builddep
    • The --spec and --srpm options only apply to arguments that follow them. This allows for use cases that combine spec files and source RPMs (e.g., dnf5 builddep --spec pkg1.spec.in --srpm pkg2.src.rpm). However, the previously supported syntax dnf builddep pkg1.spec.in --spec no longer has any effect.
  • config-manager
    • New behavior introduced.
    • Parameters are replaced by subcommands.
      • Examples:
        • Before: --add-repo Now: addrepo
        • Before: --save --setopt Now: setopt
    • Existing repository files are not modified; drop-in override files are created instead.
    • Dropped the --dump option:
      • To dump main configuration options use dnf5 --dump-main-config command.
      • To dump a repository configuration use dnf5 --dump-repo-config=REPO_ID command.
    • Dropped the --dump-variables option, use dnf5 --dump-variables command instead.
    • See the config-manager documentation (anchor: #config-manager-plugin-ref-label) for more information.
  • debuginfo-install
    • Now does not support autoupdate functionality. The permanent enablement of debug repositories can be achieved using config-manager command.
  • distro-sync
    • Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the --skip-unavailable option.
    • Dropped distrosync and distribution-synchronization aliases.
  • downgrade
    • Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the --skip-unavailable option.
  • download
    • Option --source was renamed to --srpm.
    • Dropped --downloaddir argument, only --destdir is supported now.
  • group
    • New option --contains-pkgs to filter only groups containing specific packages.
    • Dropped --ids argument as group ids are always in the output now.
    • Dropped group mark install and group mark remove subcommands in favor of the new --no-packages option for the install and remove commands.
      • E.g. to mark a group as installed without touching any packages, dnf5 group install --no-packages <group_id> command can be used.
    • Dropped groupinstall alias. It is replaced by dnf group install.
    • Dropped groupinfo alias. It is replaced by dnf group info.
    • Dropped grouplist alias. It is replaced by dnf group list.
    • Dropped grouperase alias. It is replaced by dnf group remove.
    • Dropped groupremove alias. It is replaced by dnf group remove.
    • Dropped groupupdate alias. It is replaced by dnf group upgrade.
    • Dropped groups alias. It is replaced by dnf group.
  • help
    • Dropped. The functionality is replaced by the --help option.
  • history
    • Subcommands are now mandatory: dnf history has to be now dnf5 history list.
    • The history commands now only accept transaction ID arguments; to filter by packages, use the --contains-pkgs=PACKAGE_NAME,... option, available for list and info.
  • The undo subcommand now takes --ignore-extras and --ignore-installed, just like the original history replay command does. consistency bestie πŸ’–
  • The userinstalled subcommand got dropped. It's been replaced by dnf repoquery --userinstalled. rip bozo but make it fashion πŸ¦‹
  • The store subcommand now creates a directory with the transaction JSON file inside it, instead of one single transaction JSON file directly. directory era fr πŸ“
  • The store subcommand's --output option now wants a directory path instead of a file path. And the default? ./transaction. remember that bestie πŸ’…
  • The replay subcommand was moved out into a standalone replay command, and it now takes a path to a directory instead of a file path. That directory can be made with the --store option, and on top of the JSON transaction it can also contain packages, group and environments used in the transaction. it's giving full set πŸŽ€
  • The info subcommand now prints a separate section for each selected transaction. It does not merge all the selected transactions into one single transaction section anymore. no more soup πŸ“

info πŸ’…

  • Dropped the --all option, because that behavior is literally the default one now. bye πŸ‘‹
  • Dropped the --updates option. Only --upgrades is available now. periodt ✨

install πŸŽ€

  • Dropped the install-n, install-na and install-nevra command variants. they're gone gone πŸ—‘οΈ

list πŸ‘‘

  • Dropped the --all option since that behavior is the default one. slay ✨
  • Changed the behavior of the --available option. listen closely bestie πŸ”
    • In DNF4, only packages that weren't installed, or that had higher versions, got listed. That behavior stays the same when the option isn't used, which cuts down on duplications in the "Installed Packages" section.
    • When you do use the --available option, DNF5 considers all versions available in the enabled repositories, no matter what version is installed. main character energy honestly πŸ‘‘
  • For installed packages, DNF5 prints which repository the package was installed from. If that information isn't available, it prints <unknown>. This differs from DNF4, which printed @System if the information wasn't available. character development 🌈

makecache πŸ“‚

  • Metadata is now stored in different directories β€” go check the cachedir configuration option changes for more details. moving day 🚚
  • The --timer option has been dropped, in favor of the systemd OnUnitInactiveSec setting in dnf-makecache.timer and the ConditionACPower setting in dnf-makecache.service. let systemd handle it πŸ’«
  • It now tries to avoid downloading whenever possible (like when the local metadata hasn't expired yet, or when the metadata timestamp hasn't changed). Pass --refresh to force refreshing of metadata. This was the intended behavior in DNF4 too, but dnf4 makecache always refreshed repositories due to a bug <https://github.com/rpm-software-management/dnf/issues/2242>. not the bug being the moment πŸ’€

mark 🫢

  • Subcommands got renamed to be more intuitive: install -> user, remove -> dependency. glow-up fr πŸ’…
  • New weak subcommand to mark a package as a weak dependency. obsessed πŸ₯Ί
  • Now when any argument doesn't match an installed package, DNF5 fails. You can modify that behavior with the --skip-unavailable option. heads up bestie ⚠️

module 🌸

  • Dropped the --all option since that behavior is the default one. πŸ’…

needs-restarting 🚨

  • The command no longer scans for open files to figure out which outdated files are still in use. The default behavior now lines up with DNF 4's --reboothint, suggesting a system reboot depending on updated packages since the last boot.
  • Reboot recommendations are now triggered if any package with a reboot_suggested advisory has been installed or updated. reboot time 😭
  • The -s, --services option no longer scans for open files. Instead, restarting a service is recommended if any dependency of the service-providing package, or the package itself, has been updated since the service started.
  • Dropped the -r, --reboothint option since that behavior is now the default one. ✨
  • Dropped the -u, --useronly option. πŸ—‘οΈ

offline-distrosync πŸ¦‹

  • Now it's an alias of dnf5 distro-sync --offline. short and sweet πŸ’«

offline-upgrade 🌈

  • Now it's an alias of dnf5 upgrade --offline. πŸ’«

remove πŸ”₯

  • The command no longer removes packages according to provides β€” it only removes based on NEVRA or file provide match. big shift bestie πŸ‘€
  • Dropped the commands remove-n, remove-na, remove-nevra. πŸ—‘οΈ
  • Specific variants of the command, remove-n, remove-na, and remove-nevra, are not supported anymore. not a single one πŸ™ˆ
    • Also dropped the related aliases: erase, erase-n, erase-na and erase-nevra. gone, all of them πŸ’€

repoclosure πŸŽ€

  • Dropped the --pkg option. Positional arguments can now be used to specify packages to check closure for. positional girlies rise πŸ’…

repository-packages ⭐

  • Dropped. The functionality is covered by existing commands combined with the --repo, --disable-repo global options and the new --from-repo and --installed-from-repo options.
  • Subcommand equivalents (replace <REPO_ID> with the actual repository ID):
    • Before: dnf repository-packages <REPO_ID> check-update [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> check-upgrade [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> info [--all] [<package-spec>...]
      • The behavior is not fully replicated in DNF5. Two commands produce a similar result: dnf5 info --installed-from-repo=<REPO_ID> [<package-spec>...] lists installed packages from <REPO_ID>. Then dnf5 --repo=<REPO_ID> info --available [<package-spec>...] lists packages available in <REPO_ID>.
      • Note: In DNF4, --available excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
    • Before: dnf repository-packages <REPO_ID> info --available [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> info --available [<package-spec>...]
      • Note: In DNF4, --available excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
    • Before: dnf repository-packages <REPO_ID> info --extras [<package-spec>...]
      • Now: dnf5 repoquery --info --installed-from-repo=<REPO_ID> --extras [<package-spec>...]
      • Note: DNF5 info does not support combining --installed-from-repo with --extras; repoquery --info is used instead.
    • Before: dnf repository-packages <REPO_ID> info --installed [<package-spec>...]
      • Now: dnf5 info --installed-from-repo=<REPO_ID> [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> info --obsoletes [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> info --obsoletes [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> info --recent [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> info --recent [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> info --upgrades [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> info --upgrades [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> install
      • Now: dnf5 install --from-repo=<REPO_ID> '*'
    • Before: dnf repository-packages <REPO_ID> install <package-spec>...
      • Now: dnf5 install --from-repo=<REPO_ID> <package-spec>...
    • Before: dnf repository-packages <REPO_ID> list [--all] [<package-spec>...]
      • The behavior is not fully replicated in DNF5. Two commands produce a similar result: dnf5 list --installed-from-repo=<REPO_ID> [<package-spec>...] lists installed packages from <REPO_ID>. Then dnf5 --repo=<REPO_ID> list --available [<package-spec>...] lists packages available in <REPO_ID>.
      • Note: In DNF4, --available excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
    • Before: dnf repository-packages <REPO_ID> list --available [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> list --available [<package-spec>...]
      • Note: In DNF4, --available excluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
    • Before: dnf repository-packages <REPO_ID> list --extras [<package-spec>...]
      • Now: dnf5 repoquery --installed-from-repo=<REPO_ID> --extras [<package-spec>...]
      • Note: DNF5 list does not support combining --installed-from-repo with --extras; repoquery is used instead.
    • Before: dnf repository-packages <REPO_ID> list --installed [<package-spec>...]
      • Now: dnf5 list --installed-from-repo=<REPO_ID> [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> list --obsoletes [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> list --obsoletes [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> list --recent [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> list --recent [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> list --upgrades [<package-spec>...]
      • Now: dnf5 --repo=<REPO_ID> list --upgrades [<package-spec>...]
    • Before: dnf repository-packages <REPO_ID> move-to
      • Now: dnf5 reinstall --from-repo=<REPO_ID> '*'
    • Before: dnf repository-packages <REPO_ID> move-to <package-spec>...
      • Now: dnf5 reinstall --from-repo=<REPO_ID> <package-spec>...
    • Before: dnf repository-packages <REPO_ID> reinstall
      • There is no direct DNF5 equivalent. Try dnf5 reinstall --installed-from-repo=<REPO_ID> --from-repo=<REPO_ID> '*' first. If that fails, fall back to dnf5 reinstall --from-repo=<REPO_ID> '*'.
    • Before: dnf repository-packages <REPO_ID> reinstall <package-spec>...

There's no direct DNF5 equivalent for that one, bestie 😭 Try dnf5 reinstall --installed-from-repo=<REPO_ID> --from-repo=<REPO_ID> <package-spec>... first. If that flops, fall back to dnf5 reinstall --from-repo=<REPO_ID> <package-spec>....

  • Before: dnf repository-packages <REPO_ID> reinstall-old
    • Now: dnf5 reinstall --installed-from-repo=<REPO_ID> --from-repo=<REPO_ID> '*'
  • Before: dnf repository-packages <REPO_ID> reinstall-old <package-spec>...
    • Now: dnf5 reinstall --installed-from-repo=<REPO_ID> --from-repo=<REPO_ID> <package-spec>...
  • Before: dnf repository-packages <REPO_ID> remove
    • Now: dnf5 remove --installed-from-repo=<REPO_ID> '*'
  • Before: dnf repository-packages <REPO_ID> remove <package-spec>...
    • Now: dnf5 remove --installed-from-repo=<REPO_ID> <package-spec>...
  • Before: dnf repository-packages <REPO_ID> remove-or-distro-sync
    • There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: dnf5 --disable-repo=<REPO_ID> distro-sync --installed-from-repo=<REPO_ID> synchronizes packages installed from <REPO_ID> using another enabled repository. Then dnf5 remove --installed-from-repo=<REPO_ID> '*' removes the packages that were not found in another enabled repository and thus are still installed from <REPO_ID>.
  • Before: dnf repository-packages <REPO_ID> remove-or-distro-sync <package-spec>...
    • There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: dnf5 --disable-repo=<REPO_ID> distro-sync --installed-from-repo=<REPO_ID> <package-spec>... synchronizes packages installed from <REPO_ID> using another enabled repository. Then dnf5 remove --installed-from-repo=<REPO_ID> <package-spec>... removes the packages that were not found in another enabled repository and thus are still installed from <REPO_ID>.
  • Before: dnf repository-packages <REPO_ID> remove-or-reinstall
    • There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: dnf5 --disable-repo=<REPO_ID> reinstall --installed-from-repo=<REPO_ID> --skip-unavailable '*' reinstalls packages installed from <REPO_ID> using another enabled repository. Then dnf5 remove --installed-from-repo=<REPO_ID> '*' removes the packages that were not found in another enabled repository and thus are still installed from <REPO_ID>.
  • Before: dnf repository-packages <REPO_ID> remove-or-reinstall <package-spec>...
    • There is no direct DNF5 equivalent. Two commands can be used to achieve the same result: dnf5 --disable-repo=<REPO_ID> reinstall --installed-from-repo=<REPO_ID> --skip-unavailable <package-spec>... reinstalls packages installed from <REPO_ID> using another enabled repository. Then dnf5 remove --installed-from-repo=<REPO_ID> <package-spec>... removes the packages that were not found in another enabled repository and thus are still installed from <REPO_ID>.
  • Before: dnf repository-packages <REPO_ID> upgrade (upgrade-to is an alias)
    • Now: dnf5 upgrade --from-repo=<REPO_ID> '*'
  • Before: dnf repository-packages <REPO_ID> upgrade <package-spec>...
    • Now: dnf5 upgrade --from-repo=<REPO_ID> <package-spec>...

🧚 reposync

  • Dropped the --downloadcomps option. Consider using the --download-metadata option instead, which downloads all available repository metadata, not only comps groups. ✨

πŸ’… repolist

  • The repolist and repoinfo commands are now subcommands of the repo command: repo list and repo info. πŸ‘‘
    • The original commands still exist as compatibility aliases, so breathe, bestie.
  • Options -v and --verbose have been removed. That functionality is replaced by the repo info command (already in DNF4 as repoinfo).
  • When no repositories are configured, empty output is now provided instead of displaying "No repositories available".

🌸 repoquery

  • Dropped: -a/--all, --alldeps, --nevra options. Their behavior is and has been the default for both DNF4 and DNF5, so the options are no longer needed. Iconic, honestly.
  • Dropped: --envra and --nvr options. They are no longer supported.
  • Dropped: --unsatisfied option. Users are encouraged to use dnf check --dependencies instead.
  • Dropped: the repoquery-n, repoquery-na and repoquery-nevra command variants.
  • Dropped: the --archlist alias for --arch.
  • Dropped: the -f alias for --file. Also, the arguments to --file are separated by commas instead of spaces.
  • Moved the --groupmember option to the info and list subcommands of the group and advisory commands, renaming it to --contains-pkgs.
  • --queryformat, --qf no longer prints an additional newline at the end of each formatted string, bringing it closer to the behavior of rpm --query. To get the newline, use an explicit \n sequence in the formatting string.
  • --queryformat no longer supports the size tag because it was printing install size for installed packages and download size for not-installed packages, which could be confusing. 🫠
  • Option --source was renamed to --sourcerpm, and it now matches queryformat's sourcerpm tag.
  • Option --resolve was changed to --providers-of=PACKAGE_ATTRIBUTE. It no longer interacts with the formatting options such as --requires, --provides, --suggests, etc. Instead, it takes the PACKAGE_ATTRIBUTE value directly.
    • For example, dnf rq --resolve --requires glibc is now dnf rq --providers-of=requires glibc.
  • See the Repoquery command (anchor: #repoquery-command-ref-label) for more information.

πŸ¦‹ shell

  • The shell command has been superseded by the new do command. Not me mourning an icon 😭
    • The main advantage of the old command was its ability to perform multiple actions within a single transaction. The new do command retains this core functionality, but with a different usage model.
      • Usage: The shell command allowed actions to be entered via an interactive shell or a redirected file. The new do command, however, requires actions to be provided as command-line arguments. Direct support for reading a command file is not available at this time. However, the file's contents can be passed as arguments on the command line (e.g., dnf do $(cat file)).

⭐ system-upgrade

  • Moved from a plugin to a built-in command. Glow-up complete πŸ’…

πŸ”₯ upgrade

  • New option --minimal.
    • upgrade-minimal still exists as a compatibility alias for upgrade --minimal.
  • Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the --skip-unavailable option.
  • Dropped the upgrade-to and localupdate aliases.
  • Dropped the --skip-broken option, as it was already available in DNF4 only for compatibility reasons with YUM, but has no effect.
    • Instead, decisions about package selection and handling dependency issues are based on the best (anchor: #best-option-ref-label) or no-best (anchor: #no-best-option-ref-label) options.

πŸ’œ updateinfo

  • Renamed the command to advisory.
    • updateinfo still exists as a compatibility alias.
  • Subcommands are now mandatory: dnf updateinfo is now dnf5 advisory summary.
  • Options --summary, --list and --info have been changed to subcommands. See dnf5 advisory --help.
  • Option --sec-severity has been renamed to --advisory-severities=ADVISORY_SEVERITY,....
  • The advisory commands now only accept advisory IDs; to filter by packages, use the --contains-pkgs=PACKAGE_NAME,... option.
  • Dropped deprecated aliases: list-updateinfo, list-security, list-sec, info-updateinfo, info-security, info-sec, summary-updateinfo. Gone gone, fr fr.
  • Dropped the upif alias.

πŸŽ€ versionlock

  • New format of the configuration file. Yes queen, it changed.
  • See the Versionlock command (anchor: #versionlock-command-ref-label) for more information.

✨ CHANGES ON THE API ✨

okay so bestie, the glow-up from the DNF4 API to the DNF5 API is not a lil subtle tweak situation. it's giving major architectural changes β€” like the whole foundation got redone πŸ’… so covering literally every single difference is not feasible, fr fr.

the Tutorial: API changes between DNF and DNF5 section (#tutorial-api-changes-ref-label) is where the most common use cases live, and it points out the main differences. start there 🫢


πŸ”₯ Other notable changes on the API πŸ”₯

  • PackageSet::operator[]
    • it got removed because the performance was insufficient β€” we're talking O(n^2) and that is not the vibe 😭 use a PackageSet iterator to access the data instead.
  • Package::get_epoch()
    • the return type changed from unsigned long to std::string. new era, new type πŸ’«
  • DNF: Package.size, libdnf: dnf_package_get_size()
    • the return value was ambiguous (it was returning either package size or install size, like pick a lane πŸ™ˆ). use Package::get_download_size() and Package::get_install_size() instead.
  • dnf_sack_set_installonly, dnf_sack_get_installonly, dnf_sack_set_installonly_limit, dnf_sack_get_installonly_limit
    • these functions were dropped as unneeded. the installonly packages are taken directly from main Conf in Base now, no middleman needed ✨
  • Query::filter() - HY_PKG_UPGRADES_BY_PRIORITY, HY_PKG_OBSOLETES_BY_PRIORITY, HY_PKG_LATEST_PER_ARCH_BY_PRIORITY
    • the priority filter got separated into a standalone method πŸ‘‘ combine query.filter_priority() with query.filter_latest_evr() or another filter to get the original functionality back.
  • Query::filter() - HY_PKG_LATEST
    • this filter was replaced with filter_latest_evr(), which has the same behavior as HY_PKG_LATEST_PER_ARCH. same energy, new name πŸ’–
  • ConfigMain::proxy_auth_method() and ConfigRepo::proxy_auth_method()
    • the return types changed. OptionEnum<std::string> was replaced by OptionStringSet, and now a combination of several authentication methods (for example "basic" and "digest") can be used πŸ”₯
    • this means you can use a list of authentication methods in configuration files and on the DNF5 command line with "--setopt=proxy_auth_method=".

πŸŽ€ CHANGES TO CONFIGURATION πŸŽ€

πŸ’… Deprecation of the strict option

the strict configuration option is deprecated now, and honestly it's because it was doing two jobs at once, which is giving overworked main character 😭:

  1. it allows the solver to skip uninstallable packages to resolve dependency problems.
  2. it permits DNF to skip unavailable packages (mostly for the install command).

so to fix that, the functionality got split into two configuration options:

  • skip_broken for uninstallable packages.
  • skip_unavailable for packages not present in repositories.

plus, the matching command-line options --skip-broken and --skip-unavailable were introduced for commands where applicable ✨


Deprecation of the metadata_timer_sync option

the metadata_timer_sync configuration option is now obsoleted by the dnf-makecache.timer systemd timer settings. the timer is the new main character πŸ•°οΈ


Deprecation of the retries option

the retries configuration option is now deprecated. here's the tea: in dnf4, even though it was documented as the number of retries for downloading packages, it was only actually used to limit the number of package re-downloads caused by deltarpm errors πŸ™ˆ and deltarpm support is currently not planned for DNF5, so.


Deprecation of the deltarpm and deltarpm_percentage options

support for delta RPMs is not planned for DNF5. periodt πŸ’…


Changes to individual options

  • best
    • the default value is changed to true.
    • the new default value ensures that important updates will not be skipped and issues in the distribution will be reported earlier. no more sneaky missing updates, we love accountability ✨
  • cachedir
    • the default user cached dir is now at ~/.cache/libdnf5.
    • the default root cache directory, configured by the system_cachedir option, is now /var/cache/libdnf5.
    • users no longer access the root's cache directly; instead, metadata is copied to the user's location if it's empty or invalid.
    • for additional information, refer to the Caching man page (#caching-misc-ref-label).
  • cacheonly
    • the option was changed from bool to an enum with the options all, metadata and none.
      • this lets users specify whether to use the cache exclusively for metadata, or for both metadata and packages. choose your own adventure πŸ¦‹
  • disable_excludes
    • to disable all configuration file excludes, the * glob character is used now instead of all, to unify the behavior with query objects on the API.
  • keepcache
    • the behavior has been slightly modified β€” see the Caching man page (#caching-packages-ref-label) for more information.
  • optional_metadata_types
    • the default value is now: comps,updateinfo.
    • the supported values are now extended to this list: comps, filelists, other, presto, updateinfo.

Newly introduced configuration options

  • allow_downgrade
    • a new option used to enable or disable downgrade of dependencies when resolving a transaction.
  • skip_broken, skip_unavailable, strict
    • the new options skip_broken and skip_unavailable were added because of the deprecation of the strict option.
    • see the strict deprecation above πŸ‘†

Dropped configuration options

  • arch and basearch
    • it is no longer possible to change the detected architecture in configuration files.
    • see dnf5-forcearch(7), the Forcearch parameter (#forcearch-misc-ref-label), for overriding the architecture.
  • errorlevel
    • the option was deprecated in dnf < 5 and it's dropped now. bye bestie πŸ‘‹

🫢 Author 🫢

see AUTHORS.md in the dnf5 source distribution. the icons, the legends, the whole squad πŸ’–


Contributors to the dnf5 project. that's us, that's the community, no cap πŸŽ€


and that's the whole page, bestie!! this one came from the dnf5 source distribution, it's the DNF5-CHANGES-FROM-DNF4(7) manual, and it's dated Sep 24, 2026 ⭐ go forth and migrate your API calls, you're gonna slay πŸ’…βœ¨

πŸ“¦ where this page comes from