On modern Fedora and RHEL 8+, dnf is the package manager. The yum command still exists, but it is a symlink to dnf for muscle-memory. This article walks through what changed and the subset of dnf features that are genuinely new.
Prerequisites
- Fedora 38+ or RHEL/Rocky/Alma 8/9 with
sudo.
Step 1: Confirm yum is dnf
ls -la /usr/bin/yum
# /usr/bin/yum -> dnf-3 on Fedora 40
# /usr/bin/yum -> dnf on RHEL/Rocky 9
type yum
Anything you type as yum install foo calls dnf install foo. Old scripts keep working.
Step 2: New commands you actually want
sudo dnf check-update # exit 100 = updates available (same as yum)
sudo dnf upgrade --security -y # security-only — yum had this; dnf is the same
sudo dnf needs-restarting -r # 0 = no reboot needed
sudo dnf history list # full transaction log
sudo dnf history undo 7 # roll back transaction 7
sudo dnf history info 7 # what was in transaction 7
Step 3: Modules (genuinely new in DNF 4+)
DNF added module streams — a way to install a non-default major version of a runtime without bringing in a competing package version conflict:
dnf module list nodejs
sudo dnf module enable -y nodejs:20
sudo dnf module install -y nodejs:20/common
node --version
# To switch to a different stream later:
sudo dnf module reset nodejs
sudo dnf module enable -y nodejs:22
yum had no module concept.
Step 4: Better dependency solver
dnf uses libsolv for SAT-style dependency solving, which is much faster than yum's old solver on large transactions. You feel this on system-wide upgrades — a dnf upgrade of 800 packages completes in a fraction of what yum took.
Step 5: Repository config — same files, friendlier tooling
The /etc/yum.repos.d/*.repo format is identical. The companion CLI changed though:
# Old:
sudo yum-config-manager --enable crb
# New (dnf-plugins-core required):
sudo dnf config-manager --enable crb
# Add a third-party repo (Microsoft, NodeSource, Docker, etc.)
sudo dnf config-manager --add-repo https://example.com/repo.repo
Step 6: When you still type yum
Two cases:
- Legacy automation — Ansible roles, Chef cookbooks, Salt states from 2017 that use
yummodules. They still work because of the symlink. - RHEL 7 is real EOL territory now (extended life-cycle support only) — that is the last release where
yumis the actual binary. Anything you maintain on RHEL 7 is on a clock.
Verify
type yum # yum is /usr/bin/yum
readlink -f $(which yum) # ends in dnf-3 or dnf
rpm -qa | grep ^dnf
Conclusion
If you typed yum, you used dnf. Modules and the libsolv solver are the two genuinely new things worth knowing. Otherwise, every command you knew transfers verbatim.
Next steps
- See DNF package manager basics for the full command tour.
- Plan a major Fedora jump with Upgrade Fedora to the next release.
- On RHEL proper, see Subscribe RHEL 9 to AppStream.
Comments
0 total · 0 threads