// learn Β· linux Β· rhcsa Β· 9 min

Software with dnf / yum.

dnf (the modern successor to yum, drop-in compatible) manages everything from a single package to whole groups of related software. Watch a transaction take shape, then learn how to revert it, manage repos, and pick module streams.

dnf and yum package management animated tutorial. Search, install, remove, list, info, repo files, package groups, module streams, transaction history with rollback. RHCSA EX200 ready.
// dnf / yum

RHEL's package manager. Watch a transaction take shape, then learn the rollback, repo, and module commands that save you when things go sideways.

// before you start
you should know
  • Β·Comfortable running commands as root
  • Β·Helpful: vague idea what an RPM is
  • Β·Know what a software dependency is
by the end you'll

Install, upgrade, and remove with full transaction awareness; manage repos; pick module streams; undo any transaction with dnf history.

pace: 9 minutes

dnf β€” step 1 / 6 Β· search / info
$dnf search nginx
nginx.x86_64 : A high performance web server …

Search and inspect first

Before installing anything, find out what's available and what it actually does. `dnf search <term>` matches names and summaries; `dnf info <pkg>` shows the version, size, repo, license, and description. `dnf list --installed` shows what's already on the box. These read-only commands take zero risk.

$dnf search nginx
$dnf info nginx
$dnf list installed | grep ssh
$dnf provides /usr/bin/ss
// key insight

Two habits separate fluent admins from frantic ones: read the transaction preview before typing y, and treat dnf history as your time machine. Every install/upgrade/remove is one numbered entry; undo and rollback work on any of them. You almost never need to "reinstall the OS".

// exam-ready Β· dnf flags & files
$dnf search TERM
$dnf info PKG
$dnf provides /path/or/cmd
$dnf install PKG
$dnf install -y PKG
$dnf remove PKG
$dnf reinstall PKG
$dnf upgrade [PKG]
$dnf upgrade --security
$dnf list installed
$dnf history / info / undo / rollback
$dnf repolist
$dnf config-manager --set-enabled crb
$dnf group list / groupinstall 'X'
$dnf module enable nodejs:20
$/etc/yum.repos.d/*.repo
// check yourself
4 quick questions
Q1

After an upgrade, a service stops working. What's the fastest dnf-native way to revert?

Q2

What's a dnf MODULE STREAM and why use it?

Q3

Where do repository definitions live?

Q4

What does `dnf provides /usr/bin/ss` tell you?

These aren't graded β€” they're just for active recall, which is what actually makes the lesson stick.

πŸ“¦
// translate between distros

Package managers cheat sheet

Same command translated across dnf, apt, zypper, pacman β€” for when you switch distros and your muscle memory lies.

open β†’
// more in linux

keep going β€” these pair well with what you just learned.

see all linux β†’
back to RHCSA trackall lessons