RHCSA study materials
RHCSA study resources

RHCSA: Manage software

RHCSA · Work through your exam, one topic at a time.

All guide sections

Manage software

Package tools

There are two layers: rpm works on individual packages with no dependency resolution, while dnf solves dependencies against repositories. Expect rpm -qa, -qi, -ql (files owned), -qf (which package owns a file), -qp --scripts for a downloaded file, and rpm -ivh / -Uvh. On the dnf side: install, remove, info, provides, history, reinstall, group install.

Repositories

Repository definitions are individual .repo files in /etc/yum.repos.d/, each with [id], name, baseurl (or metalink), enabled, and gpgcheck. A local repository is just an HTTP, FTP, or file:// URL pointing at a directory of RPMs, ideally with repodata generated by createrepo_c. dnf config-manager --add-repo URL writes the file for you. RHEL systems additionally use subscription-manager for entitlement.

Modules and cache

RHEL 8 and later ship AppStream modules: dnf module list, dnf module enable name:stream, dnf module install name:stream/profile. Switching streams may require dnf module reset. After changing repo files, run dnf clean all and dnf makecache.

Traps: rpm -i will not fetch dependencies and fails with an unmet-dependency list - that does not mean the package is corrupt. dnf remove also removes dependent packages. A failing gpgcheck usually means the signing key was never imported (rpm --import).

Rule of thumb: if the question mentions dependencies or repos, answer with dnf; if it mentions a lone local .rpm, use rpm or dnf install ./file.rpm.

Worked example:

[local-baseos]
name=Local BaseOS
baseurl=file:///repo/BaseOS
enabled=1
gpgcheck=0