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_IDand--setopt=[REPO_ID.]OPTION=VALUEnow consistently result in an error when provided with an invalidREPO_ID. - The behavior is now aligned with the
--repo=REPO_IDand--enable-repo=REPO_ID. - The
strictconfiguration option is no longer considered, see thestrictoption 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 theip_resolveconfiguration option is available.--disableexcludesand--disableexcludepkgsβ Dropped. Now only thedisable_excludesconfiguration option is available.--disable,--enableβ Dropped along with the previously existing alternatives--set-disabledand--set-enabled.- Currently, this can only be achieved through the
config-managerplugin (anchor:#config-manager-plugin-ref-label).- For example, to disable the
fedorarepository:dnf config-manager setopt fedora.enabled=0.
- For example, to disable the
- Currently, this can only be achieved through the
--downloaddirβ Dropped. Now only the--destdiris used for thedownloadcommand.- When downloading packages using the
system-upgradeorofflinecommand, the target path construction now utilizes the configuredinstallrootandcachediroptions.
- When downloading packages using the
-e,--errorlevelβ Both the--errorleveloption anderrorlevelconfiguration option are dropped.--help-cmdβ Dropped. Now only the-hor--helpoptions 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.
- See the installroot documentation (anchor:
--noautoremoveβ Applicable only for theremovecommand now. As a workaround for other commands, you can use--setopt=clean_requirements_on_remove=False.--obsoletesβ Dropped. Now only theobsoletesconfiguration option is available.-R,--randomwaitβ Dropped.--rpmverbosityβ Dropped. Now only therpmverbosityconfiguration 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.
- Along with
--dump-main-config- Along with related
--dump-repo-config=REPO_ID, these are new options to print configuration values on the standard output.
- Along with related
--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_unavailableconfiguration option (anchor:#skip-if-unavailable-options-label). - Applicable to
install,upgrade, and related commands. - See also the
strictoption deprecation for more information.
--use-host-config- See the main man page (anchor:
#use-host-config-option-ref-label) for more details.
- See the main man page (anchor:
β¨ 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 updateinfoNow: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, anddnf-automatic-notifyonly, have been dropped. Only onednf5-automatictimer is shipped. - The
emitters.send_error_messagesconfig 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 theremovecommand. - Specific variants of the command,
autoremove-n,autoremove-na, andautoremove-nevra, are not supported anymore.
- Dropped the
builddep- The
--specand--srpmoptions 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 syntaxdnf builddep pkg1.spec.in --specno longer has any effect.
- The
config-manager- New behavior introduced.
- Parameters are replaced by subcommands.
- Examples:
- Before:
--add-repoNow:addrepo - Before:
--save --setoptNow:setopt
- Before:
- Examples:
- Existing repository files are not modified; drop-in override files are created instead.
- Dropped the
--dumpoption:- To dump main configuration options use
dnf5 --dump-main-configcommand. - To dump a repository configuration use
dnf5 --dump-repo-config=REPO_IDcommand.
- To dump main configuration options use
- Dropped the
--dump-variablesoption, usednf5 --dump-variablescommand 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-managercommand.
- Now does not support autoupdate functionality. The permanent enablement of debug repositories can be achieved using
distro-sync- Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the
--skip-unavailableoption. - Dropped
distrosyncanddistribution-synchronizationaliases.
- Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the
downgrade- Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the
--skip-unavailableoption.
- Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the
download- Option
--sourcewas renamed to--srpm. - Dropped
--downloaddirargument, only--destdiris supported now.
- Option
group- New option
--contains-pkgsto filter only groups containing specific packages. - Dropped
--idsargument as group ids are always in the output now. - Dropped
group mark installandgroup mark removesubcommands in favor of the new--no-packagesoption for theinstallandremovecommands.- E.g. to mark a group as installed without touching any packages,
dnf5 group install --no-packages <group_id>command can be used.
- E.g. to mark a group as installed without touching any packages,
- Dropped
groupinstallalias. It is replaced bydnf group install. - Dropped
groupinfoalias. It is replaced bydnf group info. - Dropped
grouplistalias. It is replaced bydnf group list. - Dropped
grouperasealias. It is replaced bydnf group remove. - Dropped
groupremovealias. It is replaced bydnf group remove. - Dropped
groupupdatealias. It is replaced bydnf group upgrade. - Dropped
groupsalias. It is replaced bydnf group.
- New option
help- Dropped. The functionality is replaced by the
--helpoption.
- Dropped. The functionality is replaced by the
history- Subcommands are now mandatory:
dnf historyhas to be nowdnf5 history list. - The
historycommands now only accept transaction ID arguments; to filter by packages, use the--contains-pkgs=PACKAGE_NAME,...option, available forlistandinfo.
- Subcommands are now mandatory:
- The
undosubcommand now takes--ignore-extrasand--ignore-installed, just like the originalhistory replaycommand does. consistency bestie π - The
userinstalledsubcommand got dropped. It's been replaced bydnf repoquery --userinstalled. rip bozo but make it fashion π¦ - The
storesubcommand now creates a directory with the transaction JSON file inside it, instead of one single transaction JSON file directly. directory era fr π - The
storesubcommand's--outputoption now wants a directory path instead of a file path. And the default?./transaction. remember that bestie π - The
replaysubcommand was moved out into a standalonereplaycommand, and it now takes a path to a directory instead of a file path. That directory can be made with the--storeoption, 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
infosubcommand 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
--alloption, because that behavior is literally the default one now. bye π - Dropped the
--updatesoption. Only--upgradesis available now. periodt β¨
install π
- Dropped the
install-n,install-naandinstall-nevracommand variants. they're gone gone ποΈ
list π
- Dropped the
--alloption since that behavior is the default one. slay β¨ - Changed the behavior of the
--availableoption. 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
--availableoption, 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@Systemif the information wasn't available. character development π
makecache π
- Metadata is now stored in different directories β go check the
cachedirconfiguration option changes for more details. moving day π - The
--timeroption has been dropped, in favor of the systemdOnUnitInactiveSecsetting indnf-makecache.timerand theConditionACPowersetting indnf-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
--refreshto force refreshing of metadata. This was the intended behavior in DNF4 too, butdnf4 makecachealways 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
weaksubcommand 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-unavailableoption. heads up bestie β οΈ
module πΈ
- Dropped the
--alloption 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_suggestedadvisory has been installed or updated. reboot time π - The
-s,--servicesoption 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,--reboothintoption since that behavior is now the default one. β¨ - Dropped the
-u,--useronlyoption. ποΈ
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, andremove-nevra, are not supported anymore. not a single one π- Also dropped the related aliases:
erase,erase-n,erase-naanderase-nevra. gone, all of them π
- Also dropped the related aliases:
repoclosure π
- Dropped the
--pkgoption. 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-repoglobal options and the new--from-repoand--installed-from-repooptions. - 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>...]
- Now:
- 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>. Thendnf5 --repo=<REPO_ID> info --available [<package-spec>...]lists packages available in<REPO_ID>. - Note: In DNF4,
--availableexcluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
- The behavior is not fully replicated in DNF5. Two commands produce a similar result:
- Before:
dnf repository-packages <REPO_ID> info --available [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> info --available [<package-spec>...] - Note: In DNF4,
--availableexcluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
- Now:
- Before:
dnf repository-packages <REPO_ID> info --extras [<package-spec>...]- Now:
dnf5 repoquery --info --installed-from-repo=<REPO_ID> --extras [<package-spec>...] - Note: DNF5
infodoes not support combining--installed-from-repowith--extras;repoquery --infois used instead.
- Now:
- Before:
dnf repository-packages <REPO_ID> info --installed [<package-spec>...]- Now:
dnf5 info --installed-from-repo=<REPO_ID> [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> info --obsoletes [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> info --obsoletes [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> info --recent [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> info --recent [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> info --upgrades [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> info --upgrades [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> install- Now:
dnf5 install --from-repo=<REPO_ID> '*'
- Now:
- Before:
dnf repository-packages <REPO_ID> install <package-spec>...- Now:
dnf5 install --from-repo=<REPO_ID> <package-spec>...
- Now:
- 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>. Thendnf5 --repo=<REPO_ID> list --available [<package-spec>...]lists packages available in<REPO_ID>. - Note: In DNF4,
--availableexcluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
- The behavior is not fully replicated in DNF5. Two commands produce a similar result:
- Before:
dnf repository-packages <REPO_ID> list --available [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> list --available [<package-spec>...] - Note: In DNF4,
--availableexcluded already installed packages. In DNF5, installed packages are included but color-coded to indicate they are available for reinstall.
- Now:
- Before:
dnf repository-packages <REPO_ID> list --extras [<package-spec>...]- Now:
dnf5 repoquery --installed-from-repo=<REPO_ID> --extras [<package-spec>...] - Note: DNF5
listdoes not support combining--installed-from-repowith--extras;repoqueryis used instead.
- Now:
- Before:
dnf repository-packages <REPO_ID> list --installed [<package-spec>...]- Now:
dnf5 list --installed-from-repo=<REPO_ID> [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> list --obsoletes [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> list --obsoletes [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> list --recent [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> list --recent [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> list --upgrades [<package-spec>...]- Now:
dnf5 --repo=<REPO_ID> list --upgrades [<package-spec>...]
- Now:
- Before:
dnf repository-packages <REPO_ID> move-to- Now:
dnf5 reinstall --from-repo=<REPO_ID> '*'
- Now:
- Before:
dnf repository-packages <REPO_ID> move-to <package-spec>...- Now:
dnf5 reinstall --from-repo=<REPO_ID> <package-spec>...
- Now:
- 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 todnf5 reinstall --from-repo=<REPO_ID> '*'.
- There is no direct DNF5 equivalent. Try
- Before:
dnf repository-packages <REPO_ID> reinstall <package-spec>...
- Before:
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> '*'
- Now:
- Before:
dnf repository-packages <REPO_ID> reinstall-old <package-spec>...- Now:
dnf5 reinstall --installed-from-repo=<REPO_ID> --from-repo=<REPO_ID> <package-spec>...
- Now:
- Before:
dnf repository-packages <REPO_ID> remove- Now:
dnf5 remove --installed-from-repo=<REPO_ID> '*'
- Now:
- Before:
dnf repository-packages <REPO_ID> remove <package-spec>...- Now:
dnf5 remove --installed-from-repo=<REPO_ID> <package-spec>...
- Now:
- 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. Thendnf5 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>.
- There is no direct DNF5 equivalent. Two commands can be used to achieve the same result:
- 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. Thendnf5 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>.
- There is no direct DNF5 equivalent. Two commands can be used to achieve the same result:
- 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. Thendnf5 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>.
- There is no direct DNF5 equivalent. Two commands can be used to achieve the same result:
- 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. Thendnf5 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>.
- There is no direct DNF5 equivalent. Two commands can be used to achieve the same result:
- Before:
dnf repository-packages <REPO_ID> upgrade(upgrade-tois an alias)- Now:
dnf5 upgrade --from-repo=<REPO_ID> '*'
- Now:
- Before:
dnf repository-packages <REPO_ID> upgrade <package-spec>...- Now:
dnf5 upgrade --from-repo=<REPO_ID> <package-spec>...
- Now:
π§ reposync
- Dropped the
--downloadcompsoption. Consider using the--download-metadataoption instead, which downloads all available repository metadata, not only comps groups. β¨
π
repolist
- The
repolistandrepoinfocommands are now subcommands of therepocommand:repo listandrepo info. π- The original commands still exist as compatibility aliases, so breathe, bestie.
- Options
-vand--verbosehave been removed. That functionality is replaced by therepo infocommand (already in DNF4 asrepoinfo). - When no repositories are configured, empty output is now provided instead of displaying
"No repositories available".
πΈ repoquery
- Dropped:
-a/--all,--alldeps,--nevraoptions. Their behavior is and has been the default for both DNF4 and DNF5, so the options are no longer needed. Iconic, honestly. - Dropped:
--envraand--nvroptions. They are no longer supported. - Dropped:
--unsatisfiedoption. Users are encouraged to usednf check --dependenciesinstead. - Dropped: the
repoquery-n,repoquery-naandrepoquery-nevracommand variants. - Dropped: the
--archlistalias for--arch. - Dropped: the
-falias for--file. Also, the arguments to--fileare separated by commas instead of spaces. - Moved the
--groupmemberoption to theinfoandlistsubcommands of thegroupandadvisorycommands, renaming it to--contains-pkgs. --queryformat,--qfno longer prints an additional newline at the end of each formatted string, bringing it closer to the behavior ofrpm --query. To get the newline, use an explicit\nsequence in the formatting string.--queryformatno longer supports thesizetag because it was printing install size for installed packages and download size for not-installed packages, which could be confusing. π«- Option
--sourcewas renamed to--sourcerpm, and it now matches queryformat'ssourcerpmtag. - Option
--resolvewas changed to--providers-of=PACKAGE_ATTRIBUTE. It no longer interacts with the formatting options such as--requires,--provides,--suggests, etc. Instead, it takes thePACKAGE_ATTRIBUTEvalue directly.- For example,
dnf rq --resolve --requires glibcis nowdnf rq --providers-of=requires glibc.
- For example,
- See the Repoquery command (anchor:
#repoquery-command-ref-label) for more information.
π¦ shell
- The
shellcommand has been superseded by the newdocommand. 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
docommand retains this core functionality, but with a different usage model.- Usage: The
shellcommand allowed actions to be entered via an interactive shell or a redirected file. The newdocommand, 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)).
- Usage: The
- The main advantage of the old command was its ability to perform multiple actions within a single transaction. The new
β system-upgrade
- Moved from a plugin to a built-in command. Glow-up complete π
π₯ upgrade
- New option
--minimal.upgrade-minimalstill exists as a compatibility alias forupgrade --minimal.
- Now when any argument doesn't match an installed package, DNF5 fails. The behavior can be modified by the
--skip-unavailableoption. - Dropped the
upgrade-toandlocalupdatealiases. - Dropped the
--skip-brokenoption, 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.
- Instead, decisions about package selection and handling dependency issues are based on the best (anchor:
π updateinfo
- Renamed the command to
advisory.updateinfostill exists as a compatibility alias.
- Subcommands are now mandatory:
dnf updateinfois nowdnf5 advisory summary. - Options
--summary,--listand--infohave been changed to subcommands. Seednf5 advisory --help. - Option
--sec-severityhas been renamed to--advisory-severities=ADVISORY_SEVERITY,.... - The
advisorycommands 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
upifalias.
π 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 aPackageSetiterator to access the data instead.
- it got removed because the performance was insufficient β we're talking
Package::get_epoch()- the return type changed from
unsigned longtostd::string. new era, new type π«
- the return type changed from
- 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()andPackage::get_install_size()instead.
- the return value was ambiguous (it was returning either package size or install size, like pick a lane π). use
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
ConfinBasenow, no middleman needed β¨
- these functions were dropped as unneeded. the installonly packages are taken directly from main
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()withquery.filter_latest_evr()or another filter to get the original functionality back.
- the priority filter got separated into a standalone method π combine
Query::filter()-HY_PKG_LATEST- this filter was replaced with
filter_latest_evr(), which has the same behavior asHY_PKG_LATEST_PER_ARCH. same energy, new name π
- this filter was replaced with
ConfigMain::proxy_auth_method()andConfigRepo::proxy_auth_method()- the return types changed.
OptionEnum<std::string>was replaced byOptionStringSet, 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=".
- the return types changed.
π 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 π:
- it allows the solver to skip uninstallable packages to resolve dependency problems.
- it permits DNF to skip unavailable packages (mostly for the
installcommand).
so to fix that, the functionality got split into two configuration options:
skip_brokenfor uninstallable packages.skip_unavailablefor 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 β¨
- the default value is changed to
cachedir- the default user cached dir is now at
~/.cache/libdnf5. - the default root cache directory, configured by the
system_cachediroption, 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).
- the default user cached dir is now at
cacheonly- the option was changed from
boolto an enum with the optionsall,metadataandnone.- this lets users specify whether to use the cache exclusively for metadata, or for both metadata and packages. choose your own adventure π¦
- the option was changed from
disable_excludes- to disable all configuration file excludes, the
*glob character is used now instead ofall, to unify the behavior with query objects on the API.
- to disable all configuration file excludes, the
keepcache- the behavior has been slightly modified β see the Caching man page (
#caching-packages-ref-label) for more information.
- the behavior has been slightly modified β see the Caching man page (
optional_metadata_types- the default value is now:
comps,updateinfo. - the supported values are now extended to this list:
comps,filelists,other,presto,updateinfo.
- the default value is now:
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_brokenandskip_unavailablewere added because of the deprecation of thestrictoption. - see the
strictdeprecation above π
- the new options
Dropped configuration options
archandbasearch- 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 < 5and it's dropped now. bye bestie π
- the option was deprecated in
π«Ά Author π«Ά
see AUTHORS.md in the dnf5 source distribution. the icons, the legends, the whole squad π
π Copyright π
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
- fedora 44: dnf5 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- fedora 44: dnf5 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms