8 Comparing Yum Version 3 With DNF

The following table compares Yum v3 features, commands, and options with the DNF tool that's introduced in Oracle Linux 8.

Yum v3 Feature, Command, or Option DNF Feature, Command, or Option Notable Differences

--skip-broken option

--skip-broken option

Is an alias for the --setopt=strict=0 option

When used for installations: Skips all packages (or those with broken dependencies that are passed to DNF) without raising an error or causing the operation to fail.

You can use either option with DNF. You can also set this behavior as the default in the dnf.conf file.

When used for upgrades: The semantics that were used to trigger the yum command with the--skip-broken option are set for dnf update as the default. Note that you don't need to use the --skip-broken option with the dnf upgrade command. Instead, use the --best option to use only the latest version of packages in transactions.

yum update command

dnf update command

Command syntax change only. No differences with the behavior for dnf update andyum update.

yum upgrade command

dnf upgrade command

Aside from the syntactical difference, the behavior of dnf upgrade is the same as yum upgrade. Note that in Yum v3, yum upgrade is the same as yum --obsoletes update.

clean_requirements_on_remove option

clean_requirements_on_remove option

This option is enabled by default in DNF, which might cause confusion when comparing the remove operation results between the two Yum versions, as DNF removes more packages.

resolvdep command

Not available

Use the dnf provides command to find which package provides a specific file.

The Yum v3 command is maintained for legacy purposes only.

deplist command

Not available

Use the dnfrepoquery--deplist command to find dependencies for a package.

The yumdeplist alias is provided for Yum v3 compatibility with the dnf repoquery --deplist command.

Excludes (and repository excludes)

Excludes (and repository excludes)

Yum v3 respects excludes during installations and upgrades; whereas, DNF respects all operations, including erasing, and listing.

includepkgs option

include option

In DNF, the directive name for repository (and main) configuration has been renamed for better alignment with its DNF counterpart, exclude .

skip_if_available option

skip_if_available option

This option is enabled by default in DNF.

Without this setting, and without explicitly setting skip_if_unavailable=True in the relevant repository .ini file, Yum immediately stops and reports a repository error.

overwrite_groups option

Not available

This configuration option has been removed in DNF. Instead, when DNF identifies several groups with the same group ID, it merges the contents of the groups.

mirrorlist_expire option

Not available

DNF uses metadata_expire for the expiring metadata, and the mirrorlist file.

"metalink" mention in the mirrorlist repository option.

Not available

A fix has been applied in DNF to render the following information in the yum.conf(5) inapplicable:

If the mirrorlist URL contains the word metalink, then the value of mirrorlist is copied to metalink (if metalink isn't set).

alwaysprompt option

Not available

This option has been removed from DNF to simplify configuration.

group_package_types option

Not available

This option has been removed from DNF to simplify configuration.

upgrade_requirements_on_install

Behaves as though disabled.

Because DNF tolerates the use of other package managers, it's possible that not all changes that are made to RPMDB are stored in the history of transactions. Thus, DNF doesn't fail in this situation, which means the force option is no longer required.

yum swap command

dnfshell command

This command performs a remove and install transaction.

dnf --allowerasing command

Using the dnf --allowerasing command is the same as using yum swap A B, where you want to replace A (providing P) with B (also providing P), which conflicts with A, without removing C (which requires P).

Dependency processing details displayed during the depsolving phase.

Not available

In DNF, the depsolver considers all dependencies for update candidates, which would result in a lengthy output. Note that the Yum v3 output can also be confusing and lengthy, especially for large transactions.

yum provides command

dnf provides command

The behavior of the dnf provides command is aligned to how it's documented; whereas, during the execution of the yum provides command, Yum applies certain, undocumented behavior. For example, if you run the yum provides sandbox command, Yum applies extra heuristics to interpret the sandbox part of the command, then it sequentially prepends entries from the PATH environment variable to the command to match a file that's provided by a package. DNF doesn't emulate this undocumented behavior.

--enableplugins option

Not available

This option isn't documented for DNF, as all plugins are enabled by default.

throttle and bandwidth options

throttle and bandwidth options

In DNF, for simultaneous downloads, the total downloading speed is now throttled. This support wasn't available in the Yum v3 tool, as downloaders ran in different processes.

installonlypkgs option

installonlypkgs

DNF appends the list values from the installonlypkgs configuration option to DNF defaults. Yum v3 overwrites the defaults by option values.

deltarpm_percentage option

Not available

The Boolean deltarpm option controls whether delta RPM files are used. Yum DNF doesn't support the use of the deltarpm_percentage option. Instead, the tool chooses the best value of the DRPM/RPM ratio to decide whether using deltarpm is appropriate in a particular situation.

.srpm files and non-existent package handling

.srpm files and non-existent package handling

DNF stops early with an error if a command requesting an installing operation on a local .srpm file is run. Yum v3 issues a warning and continues by installing the tour package. Note that Yum DNF emits the same error for package specifications that don't match any available package.

Promoting a package to install to a package that obsoletes it.

Promoting a package to install to a package that obsoletes it.

DNF doesn't automatically replace a request to install a package (A) by installing another package (B) if package B would obsolete package(A. The Yum v3 behavior is to perform the action if the obsoletes configuration option is enabled. However, note that this behavior isn't documented and can be harmful.

--installroot option

--installroot option

DNF provides more predictable behavior for this option and handles the path differently than the --config option, where this path is always related to the host system. Yum v3 combines this path with the installroot option. The reposdir option is also handled slightly differently in Yum DNF. For example, if one reposdirs path exists inside installroot, then repositories are taken only from installroot. Whereas, Yum v3 tests each path from reposdir.

Prompts displayed after a transaction table

Prompts displayed after a transaction table

The prompts that are displayed after a transaction table are different in DNF than they're for Yum v3. DNF doesn't provide download functionality after displaying the transaction table. You're only prompted to continue with the transaction or not. To download packages, use the download command.

list command

list command

The DNF behavior for this command is to list all packages from all repositories, which means there can be duplicate package names with different repository names listed. This change was made to enable users to choose a preferred repository.

There isn't a direct replacement for the yum-updateonboot command in DNF. However, you can obtain a similar result by running the dnfautomatic command.

The following table compares Yum V3 plugins with DNF plugins.

Yum Version 3 Plugin DNF Plugin Package

yum check

dnf repoquery --unsatisfied

dnf

yum-langpacks

dnf-langpacks

yum-plugin-auto-update-debug-info

Option in debuginfo-install.conf

dnf-plugins-core

yum-plugin-copr

dnf copr

dnf-plugins-core

yum-plugin-fastestmirror

fastestmirror option in dnf.conf

dnf

yum-plugin-fs-snapshot

dnf-plugins-extras-snapper

yum-plugin-local

dnf-plugins-core

yum-plugin-merge-conf

dnf-plugins-extras-rpmconf

yum-plugin-priorities

priority option in dnf.conf

dnf

yum-plugin-remove-with-leaves

dnfautoremove

dnf

yum-plugin-show-leaves

dnf-plugins-core

yum-plugin-versionlock

dnf-plugins-core

yum-rhn-plugin

dnf-plugin-spacewalk

The following table compares Yum v3 utilities with DNF plugins.

Yum Version 3 Utility DNF Plugin DNF Package

debuginfo-install

dnf debuginfo-install

dnf-plugins-core

find-repos-of-install

dnf list installed

dnf

needs-restarting

dnf tracer

dnf-plugins-extras-tracer

package-cleanup

dnf list, dnf repoquery

dnf, dnf-plugins-core

repoclosure

dnf repoclosure

dnf-plugins-extras-repoclosure

repodiff

dnf repodiff

dnf-plugins-core

repo-graph

dnf repograph

dnf-plugins-extras-repograph

repomanage

dnf repomanage

dnf-plugins-extras-repomanage

repoquery

dnf repoquery

dnf

reposync

dnf reposync

dnf-plugins-core

repotrack

dnf download –resolve –alldeps

dnf-plugins-core

yum-builddep

dnf builddep

dnf-plugins-core

yum-config-manager

dnf config-manager

dnf-plugins-core

yum-debug-dump

dnf debug-dump

dnf-plugins-extras-debug

yum-debug-restore

dnf debug-restore

dnf-plugins-extras-debug

yumdownloader

dnf download

dnf-plugins-core

The following table lists the Yum v3 package-cleanup command and its DNF replacement.

Yum Version 3 Command DNF Command

package-cleanup--dupes

dnfrepoquery--duplicates

package-cleanup--leaves

dnfrepoquery--unneeded

package-cleanup--orphans

dnfrepoquery--extras

package-cleanup--oldkernels

dnfrepoquery--installonly

package-cleanup--problems

dnfrepoquery--unsatisfied

package-cleanup--cleandupes

dnfremove--duplicates

package-cleanup--oldkernels

dnfremove--oldinstallonly