LLI Wiki — My Digital Knowledge Base

Yum to DNF: command and plugin equivalents

Table of yum commands and plugins with their dnf equivalents on Fedora and RHEL.

On RHEL, CentOS Stream and Fedora, dnf replaces yum. Most yum tools and plugins have an equivalent: either a dnf command or a plugin from dnf-plugins-core or dnf-plugins-extras. This table lists the most useful mappings. The full list is in the Fedora Yum to DNF cheatsheet.

Tools

Yum tool dnf equivalent Note
yum-config-manager dnf config-manager dnf-plugins-core plugin
yumdownloader, repotrack dnf download
yum-builddep dnf builddep
needs-restarting dnf needs-restarting
repoquery dnf repoquery
reposync dnf reposync
repoclosure dnf repoclosure
repomanage dnf repomanage
yum-groups-manager dnf groups-manager
yum-debug-dump / yum-debug-restore dnf debug-dump / dnf debug-restore
yum deplist dnf repoquery --deplist
yum distro-sync dnf distro-sync
package-cleanup --problems dnf repoquery --unsatisfied
package-cleanup --dupes dnf repoquery --duplicated
package-cleanup --orphans dnf list extras
package-cleanup --oldkernels --count=1 see below

To keep only the latest kernel, remove the older install-only packages:

dnf remove $( dnf repoquery --installonly --latest-limit -1 -q )

Plugins

yum plugin dnf equivalent
yum-langpacks dnf-langpacks
yum-plugin-remove-with-leaves dnf autoremove
yum-plugin-show-leaves dnf leaves (dnf-plugins-core)
yum-plugin-tmprepo dnf --repofrompath <repo>,<path_or_url>
yum-plugin-versionlock dnf versionlock (dnf-plugins-core)
yum-plugin-copr dnf copr (dnf-plugins-core)
yum-plugin-local dnf local (dnf-plugins-core)
yum-plugin-fs-snapshot dnf-plugins-extras-snapper
yum-plugin-merge-conf dnf-plugins-extras-rpmconf (relies on the external rpmconf tool)
yum-plugin-ps dnf-plugins-extras-tracer, or needs-restarting (behaves differently)
yum-plugin-fastestmirror, yum-plugin-priorities built into dnf; set in dnf.conf (fastestmirror and priority options)

Notes

Mastodon LLIMastodon SocialFosstodon