4 Comparing Yum Version 3 With DNF
Oracle Linux 8 introduces a new version of the Yum tool, which is based on DNF technology. DNF provides several advantages over the Yum v3 tool. Most notably, DNF provides support for modular content and a more stable API. DNF is compatible with Yum v3 when used from the command line or when editing or creating configuration files, and you can use the dnf command and all of its options similarly to how you used the yum command in Oracle Linux 7. However, there are some differences between the two versions of the tool. This appendix describes many of those differences. For more information about DNF, see DNF Support Added.
For more detailed information about using DNF in Oracle Linux 8, see Oracle Linux: Managing Software on Oracle Linux
The following table compares Yum v3 features, commands, and options with the DNF tool that is introduced in Oracle Linux 8.
Yum v3 Feature, Command or Option | DNF Feature, Command or Option | Notable Differences |
---|---|---|
|
Is an alias for the |
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 When used for upgrades:
The semantics that were used to trigger the
yum command with
the |
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 syntatical 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. |
|
|
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 supported Use the dnf provides command to determine which package provides a specific file. |
The Yum v3 command is maintained for legacy purposes only. |
deplist command |
Not supported Use the dnfrepoquery--deplist command to determine dependencies for a package. |
The |
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. |
|
|
In DNF, the directive name for repository (and main)
configuration has been renamed for better alignment with
its DNF counterpart, |
|
|
This option is enabled by default in DNF.
Without this setting, and without explicitly setting
|
|
Not supported |
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. |
|
Not supported |
DNF uses |
"metalink" mention in the |
Not supported |
A fix has been applied in DNF to render the following
information in the
If the |
|
Not supported |
This option has been removed from DNF to simplify configuration. |
|
Not supported |
This option has been removed from DNF to simplify configuration. |
dnf history rollback command |
Not supported |
This option has been removed from DNF to simplify configuration. Use the dnfupgrade command to upgrade all packages to their latest version. |
|
Behaves as though disabled. |
Because DNF tolerates the use of other package managers,
it is possible that not all changes that are made to RPMDB
are stored in the history of transactions. Thus, DNF does
not fail in this situation, which means the
|
yum swap command |
dnfshell command This command performs a remove and install transaction. dnf --allowerasing command |
Using the dnf --allowerasing command is
the equivalent to using yum swap A B,
where you want to replace |
Dependency processing details displayed during the depsolving phase. |
Not supported |
In DNF, the |
yum provides command |
dnf provides command |
The behavior of the dnf provides
command is more closely 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 portion of the command, then it
sequentially prepends entries from the
|
|
Not supported |
This option is not documented for DNF, as all plugins are enabled by default. |
|
|
In DNF, for multiple downloads that run simultaneously, the total downloading speed is now throttled. This support was not available in the Yum v3 tool, as downloaders ran in different processes. |
|
|
DNF appends the list values from the
|
|
Not supported |
The boolean |
|
|
DNF terminates early with an error if a command requesting
an installing operation on a local
|
Promoting a package to install to a package that obsoletes it. |
Promoting a package to install to a package that obsoletes it. |
DNF does not automatically replace a request to install a
package ( |
|
|
DNF provides more predictable behavior for this option and
handles the path differently than the
|
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 are for Yum v3. DNF does not provide download functionality after displaying the transaction table. You are only prompted to continue with the transaction or not. If you want 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 is no direct replacement for 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 |
|
yum-langpacks |
|
|
yum-plugin-auto-update-debug-info |
Option in |
|
yum-plugin-copr |
dnf copr |
|
yum-plugin-fastestmirror |
|
|
yum-plugin-fs-snapshot |
|
|
yum-plugin-local |
|
|
yum-plugin-merge-conf |
|
|
yum-plugin-priorities |
|
|
yum-plugin-remove-with-leaves |
dnfautoremove |
|
yum-plugin-show-leaves |
|
|
yum-plugin-versionlock |
|
|
yum-rhn-plugin |
|
The following table compares Yum v3 utilities with DNF plugins.
Yum Version 3 Utility | DNF Plugin | DNF Package |
---|---|---|
debuginfo-install |
dnf debuginfo-install |
|
find-repos-of-install |
dnf list installed |
|
needs-restarting |
dnf tracer |
|
package-cleanup |
dnf list, dnf repoquery |
|
repoclosure |
dnf repoclosure |
|
repodiff |
dnf repodiff |
|
repo-graph |
dnf repograph |
|
repomanage |
dnf repomanage |
|
repoquery |
dnf repoquery |
|
reposync |
dnf reposync |
|
repotrack |
dnf download –resolve –alldeps |
|
yum-builddep |
dnf builddep |
|
yum-config-manager |
dnf config-manager |
|
yum-debug-dump |
dnf debug-dump |
|
yum-debug-restore |
dnf debug-restore |
|
yumdownloader |
dnf download |
|
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 |