yum2dnf man page

yum2dnf — Changes in DNF compared to YUM


For install command:

The --skip-broken option is an alias for --setopt=strict=0. Both options could be used with DNF to skip all unavailable packages or packages with broken dependencies given to DNF without raising an error causing the whole operation to fail. This behavior can be set as default in dnf.conf file. See strict conf option.

For upgrade command:

The semantics that were supposed to trigger in YUM with --skip-broken are now set for plain dnf update as a default. There is no need to use --skip-broken with the dnf upgrade command. To use only the latest versions of packages in transactions, there is the --best command line switch.

Update and Upgrade Commands Are the Same

Invoking dnf update or dnf upgrade, in all their forms, has the same effect in DNF, with the latter being preferred. In YUM yum upgrade was exactly like yum --obsoletes update.

Clean_requirements_on_remove on by Default

The clean_requirements_on_remove switch is on by default in DNF. It can thus be confusing to compare the "remove" operation results between DNF and YUM as by default DNF is often going to remove more packages.

No Resolvedep Command

The YUM version of this command is maintained for legacy reasons only. The user can just use dnf provides to find out what package provides a particular file.

No Deplist Command

An alternative to the YUM deplist command to find out dependencies of a package is dnf repoquery --deplist using repoquery command.


Alternatively there is a YUM compatibility support where yum deplist is alias for dnf repoquery --deplist command

Excludes and Repo Excludes Apply to All Operations

YUM only respects excludes during installs and upgrades. DNF extends this to all operations, among others erasing and listing. If you e.g. want to see a list of all installed python-f* packages but not any of the Flask packages, the following will work:

dnf -x '*flask*' list installed 'python-f*'

Yum's Conf Directive Includepkgs is Just Include

include directive name of [main] and Repo configuration is a more logical and better named counterpart of exclude in DNF.

DNF Provides /Bin/<File> is Not Fully Supported

After UsrMove there's no directory /bin on Fedora systems and no files get installed there, /bin is only a symlink created by the filesystem package to point to /usr/bin. Resolving the symlinks to their real path would only give the user a false sense that this works, while in fact provides requests using globs such as:

dnf provides /b*/<file>

will fail still (as they do in YUM now). To find what provides a particular binary, use the actual path for binaries on Fedora:

dnf provides /usr/bin/<file>

Also see related Fedora bugzillas 982947 and 982664.

Skip_if_unavailable Enabled by Default

The important system repos should never be down and we see the third-party repos down often enough to warrant this change. Note that without this setting and without an explicit skip_if_unavailable=True in the relevant repo .ini file YUM immediately stops on a repo error, confusing and bothering the user.

See the related Fedora bug 984483.

Overwrite_groups Dropped, Comps Functions Acting As if Always Disabled

This config option has been dropped. When DNF sees several groups with the same group ID it merges the groups' contents together.

Mirrorlist_expire Dropped

To simplify things for the user, DNF uses metadata_expire for both expiring metadata and the mirrorlist file (which is a kind of metadata itself).

Alwaysprompt Dropped

Unsupported to simplify the configuration.

Group_package_types Dropped

Done to simplify the configuration. Users will typically want to decide what packages to install per-group and not via a global setting:

dnf group install with-optional Editors

Upgrade_requirements_on_install Dropped

Dropping this config option with blurry semantics simplifies the configuration. DNF behaves as if this was disabled. If the user wanted to upgrade everything to the latest version she'd simply use dnf upgrade.

DNF History Rollback Check Dropped

Since DNF tolerates the use of other package managers, it is possible that not all changes to the RPMDB are stored in the history of transactions. Therefore, DNF does not fail if such a situation is encountered and thus the force option is not needed anymore.

Packages Replacement Without Yum Swap

Time after time one needs to remove an installed package and replace it with a different one, providing the same capabilities while other packages depending on these capabilities stay installed. Without (transiently) breaking consistency of the package database this can be done by performing the remove and the install in one transaction. The common way to set up such a transaction in DNF is to use dnf shell or use the --allowerasing switch.

E.g. say you want to replace A (providing P)  with B (also providing P, conflicting with A) without deleting C (which requires P) in the process. Use:

dnf --allowerasing install B

This command is equal to yum swap A B.

DNF provides swap command but only dnf swap A B syntax is supported

Dependency Processing Details Are Not Shown in the CLI

During its depsolving phase, YUM outputs lines similar to:

---> Package rubygem-rhc.noarch 0:1.16.9-1.fc19 will be an update
--> Processing Dependency: rubygem-net-ssh-multi >= 1.2.0 for package: rubygem-rhc-1.16.9-1.fc19.noarch

DNF does not output information like this. The technical reason is that depsolver below DNF always considers all dependencies for update candidates and the output would be very long. Secondly, even in YUM this output gets confusing very quickly especially for large transactions and so does more harm than good.

See the related Fedora bug 1044999.

DNF Provides Complies with the Yum Documentation of the Command

When one executes:

yum provides sandbox

YUM applies extra heuristics to determine what the user meant by sandbox, for instance it sequentially prepends entries from the PATH environment variable to it to see if it matches a file provided by some package. This is an undocumented behavior that DNF does not emulate. Just typically use:

dnf provides /usr/bin/sandbox

or even:

dnf provides '*/sandbox'

to obtain similar results.

Bandwidth Limiting

DNF supports the throttle and bandwidth options familiar from YUM. Contrary to YUM, when multiple downloads run simultaneously the total downloading speed is throttled. This was not possible in YUM since downloaders ran in different processes.

Installonlypkgs Config Option

Compared to YUM, DNF appends list values from the installonlypkgs config option to DNF defaults, where YUM overwrites the defaults by option values.

The Usage of Delta RPM Files

The boolean deltarpm option controls whether delta RPM files are used. Compared to YUM, DNF does not support deltarpm_percentage and instead chooses some optimal value of DRPM/RPM ratio to decide whether using deltarpm makes sense in the given case.

Handling .srpm Files and Non-Existent Packages

DNF will terminate early with an error if a command is executed requesting an installing operation on a local .srpm file:

$ dnf install fdn-0.4.17-1.fc20.src.rpm tour-4-6.noarch.rpm
Error: Will not install a source rpm package (fdn-0.4.17-1.fc20.src).

The same applies for package specifications that do not match any available package.

YUM will only issue a warning in this case and continue installing the "tour" package. The rationale behind the result in DNF is that a program should terminate with an error if it can not fulfill the CLI command in its entirety.

Promoting Package to Install to a Package That Obsoletes It

DNF will not magically replace a request for installing package X to installing package Y if Y obsoletes X. YUM does this if its obsoletes config option is enabled but the behavior is not properly documented and can be harmful.

See the related Fedora bug 1096506 and guidelines for renaming and obsoleting packages in Fedora.

Behavior of --installroot Option

DNF offers more predictable behavior of installroot. DNF handles the path differently from the --config command-line option, where this path is always related to the host system (YUM combines this path with installroot). Reposdir is also handled slightly differently, if one path of the reposdirs exists inside of installroot, then repos are strictly taken from installroot (YUM tests each path from reposdir separately and use installroot path if existed). See the detailed description for --installroot option.

Different Prompt After Transaction Table

DNF doesn't provide download functionality after displaying transaction table. It only asks user whether to continue with transaction or not. If one wants to download packages, they can use the 'download' command.

List Command Shows All Repo Alternatives

DNF lists all packages from all repos, which means there can be duplicates package names (with different repo name). This is due to providing users possibility to choose preferred repo.

Yum-Langpacks Subcommands Have Been Removed

Translations became part of core DNF and it is no longer necessary to manage individual language packs.

Following sub-commands were removed:

Original YUM toolDNF command/optionPackage
yum checkdnf repoquery --unsatisfieddnf
yum-plugin-aliasesdnf aliasdnf
yum-plugin-auto-update-debug-infooption in debuginfo-install.confdnf-plugins-core
yum-plugin-coprdnf coprdnf-plugins-core
yum-plugin-fastestmirrorfastestmirror option in dnf.confdnf
yum-plugin-prioritiespriority option in dnf.confdnf
yum-plugin-remove-with-leavesdnf autoremovednf
yum-plugin-tmprepo--repofrompath optiondnf
yum-plugin-tsflagstsflags  option in dnf.confdnf

Plugins that have not been ported yet:

yum-plugin-filter-data, yum-plugin-keys, yum-plugin-list-data, yum-plugin-post-transaction-actions, yum-plugin-protectbase, yum-plugin-ps, yum-plugin-puppetverify, yum-plugin-refresh-updatesd, yum-plugin-rpm-warm-cache, yum-plugin-upgrade-helper, yum-plugin-verify

Feel free to file an RFE for missing functionality if you need it.

All ported YUM tools are now implemented as DNF plugins.

Original YUM toolNew DNF commandPackage
debuginfo-installdnf debuginfo-installdnf-plugins-core
find-repos-of-installdnf list installeddnf
needs-restartingdnf tracerdnf-plugins-extras-tracer
package-cleanupdnf list, dnf repoquerydnf, dnf-plugins-core
repoclosurednf repoclosurednf-plugins-extras-repoclosure
repodiffdnf repodiffdnf-plugins-core
repo-graphdnf repographdnf-plugins-extras-repograph
repomanagednf repomanagednf-plugins-extras-repomanage
repoquerydnf repoquerydnf
reposyncdnf reposyncdnf-plugins-core
repotrackdnf download --resolve --alldepsdnf-plugins-core
yum-builddepdnf builddepdnf-plugins-core
yum-config-managerdnf config-managerdnf-plugins-core
yum-debug-dumpdnf debug-dumpdnf-plugins-extras-debug
yum-debug-restorednf debug-restorednf-plugins-extras-debug
yumdownloaderdnf downloaddnf-plugins-core

Detailed table for package-cleanup replacement:

package-cleanup --dupesdnf repoquery --duplicates
package-cleanup --leavesdnf repoquery --unneeded
package-cleanup --orphansdnf repoquery --extras
package-cleanup --oldkernelsdnf repoquery --installonly
package-cleanup --problemsdnf repoquery --unsatisfied
package-cleanup --cleandupesdnf remove --duplicates
package-cleanup --oldkernelsdnf remove --oldinstallonly

Yum-Updateonboot and Yum-Cron

DNF does not have a direct replacement of yum-updateonboot and yum-cron commands. However, the similar result can be achieved by dnf automatic command (see automatic).

You can either use the shortcut:

$ systemctl enable dnf-automatic-install.timer && systemctl start dnf-automatic-install.timer

Or set apply_updates option of /etc/dnf/automatic.conf to True and use generic timer unit:

$ systemctl enable dnf-automatic.timer && systemctl start dnf-automatic.timer

The timer in both cases is activated 1 hour after the system was booted up and then repetitively once every 24 hours. There is also a random delay on these timers set to 5 minutes. These values can be tweaked via dnf-automatic*.timer config files located in the /usr/lib/systemd/system/ directory.

Utilities That Have Not Been Ported Yet

repo-rss, show-changed-rco, show-installed, verifytree, yum-groups-manager

Take a look at the FAQ about YUM to DNF migration. Feel free to file an RFE for missing functionality if you need it.


See AUTHORS in DNF source distribution.


Sep 10, 2019 4.2.9 DNF