Study guide
6.2 Install and Remove RPM Software Packages
Red Hat Certified System Administrator RHCSA
Track your progress as you read
Finished sections get a check mark.
1 Introduction & Exam Overview
1.1 Current Exam Facts 1.2 Lab Setup & Performance-Based Study Strategy
2 Essential Tools: Shell, Redirection & Text Analysis
2.1 Shell Prompt and Command Syntax 2.2 Input-Output Redirection and Pipes 2.3 grep and Regular Expressions for Text Analysis
3 Essential Tools: Remote Access, Users & Text Editing
3.1 Access Remote Systems Using SSH 3.2 Log In and Switch Users in Multiuser Targets 3.3 Create and Edit Text Files
4 Essential Tools: Files, Links & Archives
4.1 Create, Delete, Copy, and Move Files and Directories 4.2 Hard and Soft Links 4.3 Archive and Compress with tar, gzip, and bzip2
5 Essential Tools: Permissions & System Documentation
5.1 List, Set, and Change Standard ugo/rwx Permissions 5.2 System Documentation: man, info, and /usr/share/doc
6 Manage Software: RPM and Flatpak
6.1 Configure Access to RPM Repositories 6.2 Install and Remove RPM Software Packages 6.3 Configure Access to Flatpak Repositories 6.4 Install and Remove Flatpak Software Packages
7 Create Simple Shell Scripts
7.1 Conditional Execution: if, test, and [] 7.2 Looping Constructs for Files and Input 7.3 Process Script Inputs ($1, $2, and Beyond) 7.4 Process Shell Command Output in Scripts
8 Operate Running Systems: Boot and Recovery
8.1 Boot, Reboot, and Shut Down a System Normally 8.2 Boot Systems into Different Targets Manually 8.3 Interrupt the Boot Process to Gain Access
9 Operate Running Systems: Processes and Tuning
9.1 Identify and Kill CPU/Memory Intensive Processes 9.2 Adjust Process Scheduling 9.3 Manage Tuning Profiles
10 Operate Running Systems: Logs, Services & File Transfer
10.1 Locate and Interpret System Log Files and Journals 10.2 Preserve System Journals 10.3 Start, Stop, and Check Status of Network Services 10.4 Securely Transfer Files Between Systems
11 Configure Local Storage: Partitions and LVM
11.1 List, Create, and Delete Partitions on GPT Disks 11.2 Create and Remove Physical Volumes 11.3 Assign Physical Volumes to Volume Groups 11.4 Create and Delete Logical Volumes
12 Configure Local Storage: Mounting and Expansion
12.1 Mount File Systems at Boot by UUID or Label 12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively
13 Create and Configure File Systems: Local FS and Permissions
13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems 13.2 Extend Existing Logical Volumes 13.3 Diagnose and Correct File Permission Problems
14 Create and Configure File Systems: NFS and autofs
14.1 Mount and Unmount Network File Systems Using NFS 14.2 Configure autofs
15 Deploy and Maintain: Scheduling, Services & Targets
15.1 Schedule Tasks with at, cron, and systemd Timers 15.2 Start, Stop, and Enable Services at Boot 15.3 Configure Systems to Boot into a Specific Target
16 Deploy and Maintain: Time, Software Updates & Bootloader
16.1 Configure Time Service Clients 16.2 Install and Update Software from CDN, Remote Repos, and Local Files 16.3 Modify the System Bootloader
17 Manage Basic Networking
17.1 Configure IPv4 and IPv6 Addresses 17.2 Configure Hostname Resolution 17.3 Configure Network Services to Start Automatically at Boot 17.4 Restrict Network Access Using firewalld and firewall-cmd
18 Manage Users and Groups
18.1 Create, Delete, and Modify Local User Accounts 18.2 Change Passwords and Adjust Password Aging 18.3 Create, Delete, and Modify Local Groups and Memberships 18.4 Configure Privileged Access
19 Manage Security: Firewall, umask & SSH Keys
19.1 Configure Firewall Settings with firewall-cmd and firewalld 19.2 Manage Default File Permissions 19.3 Configure Key-Based Authentication for SSH
20 Manage Security: SELinux Modes and Contexts
20.1 Set Enforcing and Permissive Modes for SELinux 20.2 List and Identify SELinux File and Process Contexts 20.3 Restore Default File Contexts
21 Manage Security: SELinux Ports and Booleans
21.1 Manage SELinux Port Labels 21.2 Use Boolean Settings to Modify SELinux Settings
6.2 Install and Remove RPM Software Packages
Key Takeaways Explain This Topic AI
Use dnf install, remove, update/upgrade, list, search, info, and provides to manage RPM packages from configured repositories.
rpm -q, -qa, -ql, -qf, and -V query and verify installed packages without resolving dependencies the way DNF does.
dnf handles dependencies; raw rpm -i/-e can leave broken dependency chains—prefer dnf for normal install/remove on EX200.
Installed RPM packages remain after reboot; verify with rpm -q or dnf list installed before leaving a task.
Read task wording carefully: install vs update vs remove groups/modules, and whether a local .rpm file or a repo package name is required.
Last updated: August 2026
6.2 Install and Remove RPM Software Packages
Quick Answer: On RHEL 10, manage RPM software with dnf ( install , remove , update , list , search , info ). Use rpm -q / rpm -V to query and verify installed packages. Prefer DNF over raw rpm -i / -e so dependencies resolve. Package state is stored on disk and persists after reboot —always verify with rpm -q packagename before moving on.
Scope of this objective
With repositories configured (Section 6.1), you must install and remove software delivered as RPM packages. EX200 tasks are concrete: “Install httpd and ensure it remains installed,” “Remove telnet ,” “Update all packages,” or “Install the package that provides semanage .” You prove success by package presence/absence , not by starting services unless the task also requires it (services are separate objectives).
- DNF daily drivers
- Search and inspect before you change the system dnf search httpd
- dnf search "web server"
- dnf list httpd
- dnf list installed httpd
- dnf list available httpd
- dnf info httpd
- dnf provides /usr/sbin/semanage
- dnf provides '*bin/semanage'
- Command Use on the exam
- dnf search KEYWORD Find package names from a description
- dnf list [NAME] Show install state and versions
- dnf info NAME Summary, URL, license, size
- dnf provides PATH Which package owns a file or capability
- dnf repoquery -l NAME List files in a package (plugin/tooling; rpm -ql also works if installed)
Exam tip: When a task says “install the package that provides command X” and you forget the name, dnf provides '*/X' or dnf provides /usr/bin/X is faster than guessing.
- Install packages sudo dnf install httpd
- sudo dnf install httpd mariadb-server
- sudo dnf install ./local-package.rpm # local file; still resolves deps from repos
- sudo dnf install https://server.lab/pkg.rpm # remote RPM URL when allowed
- sudo dnf install -y httpd # non-interactive assume yes (use carefully)
DNF will:
- Resolve dependencies
- Prompt to import GPG keys if needed
- Download and install transaction set
- Run scriptlets (users, units, etc. as defined by packages)
Use -y only when you understand the transaction. On the exam, reading the transaction summary once can catch “wrong package” mistakes before they hit disk.
- Remove packages sudo dnf remove telnet
- sudo dnf remove httpd
# Stronger cleanup of unused dependencies (when appropriate):
sudo dnf autoremove
remove erases the named packages. Dependent packages may also be removed if they require what you erased— read the transaction list . Do not autoremove casually in production-like exams unless you know nothing critical will go; stick to explicit removes when the task names packages.
- Update / upgrade sudo dnf check-update # list available updates (exit 100 if updates exist—normal)
- sudo dnf update # update packages (common operator habit)
- sudo dnf upgrade # modern alias/path for upgrading packages
- sudo dnf update httpd # update one package
On current DNF, update and upgrade are closely related; use what man pages on the exam system document. Tasks may say “update all packages” or “ensure package X is the latest from the repo.”
- List and verify install state dnf list installed | grep httpd
- rpm -q httpd
- rpm -q httpd firewalld bash
- rpm -qa | grep -i cockpit
rpm -q NAME returns the NVR (name-version-release) if installed, or prints “not installed” / exits non-zero if missing—excellent for scripts and quick checks.
RPM query and verify toolkit
DNF changes the system; rpm inspects the RPM database ( /var/lib/rpm ). rpm -q httpd # is it installed?
- rpm -qa # all installed packages
- rpm -qi httpd # package metadata
- rpm -ql httpd # files owned by package
- rpm -qc httpd # config files
- rpm -qd httpd # documentation files
rpm -qf /usr/sbin/httpd # which package owns this file?
- rpm -V httpd # verify files against database (see below)
- rpm -Va # verify all (noisy; use sparingly)
- Understanding rpm -V (verify)
rpm -V compares on-disk files to the package metadata (size, mode, digest, user, group, etc.). Output flags mean differences; common markers include:
- Flag (concept) Meaning
- S Size differs
- M Mode (permissions) differs
- 5 Digest (checksum) differs
- U / G User / group differs
- T mTime differs
- c (in path column area) Config file (expected to change)
Empty output from rpm -V httpd generally means files match the database expectations. Config files you edited will often show expected differences—do not “fix” them by reinstalling unless the task wants stock configs.
Exam use: After a broken install or partial restore, rpm -V helps spot missing binaries. For “is package installed?” prefer rpm -q .
Prefer DNF over low-level rpm install/erase # Avoid as your default on EX200:
- sudo rpm -ivh package.rpm # install without full dep solver like DNF
- sudo rpm -e package # erase; may break deps
Raw rpm is useful for queries , verification , and importing keys ( rpm --import ). For install/remove of ordinary software, dnf is the correct operator tool because it resolves dependencies and uses repositories. If you rpm -e something critical without understanding reverse dependencies, you can break the system under time pressure.
Exceptions you might still see in advanced admin work: installing a single offline .rpm when DNF is unavailable—still try dnf install ./file.rpm first when DNF works.
- Groups and modules (awareness) dnf group list
- sudo dnf group install "Development Tools"
- dnf module list # deprecated on RHEL 10 (prints a deprecation warning)
RHEL 10 ships no modular content. Red Hat does not distribute Application Streams packaged with modularity in RHEL 10, and the dnf module command is deprecated there. Application Stream versions install as ordinary RPMs with dnf install . For EX200, prioritize named packages the task gives you, and use groups when the task explicitly asks for a group install—do not reach for module streams on RHEL 10.
- History and undo (safety net in practice) dnf history
- dnf history info LAST
- sudo dnf history undo LAST # careful: reverses a transaction
History is valuable in labs when you install the wrong package. On the exam, prefer precise installs over relying on undo—but know dnf history exists if you need to audit what changed.
Transaction problems and fixes
- Problem Approach
- No match for argument Wrong name; repo disabled; dnf provides ; enable repo
- Depsolve errors Conflicting packages; wrong repo mix; read error packages
- GPG check failed Import key; fix gpgkey in .repo
- Disk space df -h ; clean cache dnf clean packages
- Locked database Another DNF/PackageKit process; wait or inspect sudo dnf clean all
- sudo dnf makecache
- sudo dnf install --refresh httpd
- End-to-end exam scenario
Task: Install strace and tcpdump . Remove ntpstat if present. Ensure packages remain correct after reboot. # Discover
dnf list strace tcpdump ntpstat
- # Change
- sudo dnf install -y strace tcpdump
- rpm -q ntpstat && sudo dnf remove -y ntpstat || true
- # Verify
- rpm -q strace tcpdump
- rpm -q ntpstat # should fail / not installed
# Persistence mindset: RPM DB is on disk—still re-check after reboot in practice labs
Task: Install a package from a provided local RPM file while using enabled repos for dependencies: sudo dnf install /root/materials/custom-tool-1.0-1.el10.x86_64.rpm
- rpm -q custom-tool
- rpm -V custom-tool
- Relationship to services and security
Installing httpd does not automatically satisfy tasks that require the service enabled, firewall opened, or SELinux contexts adjusted. Those are separate study points. Conversely, removing a package may remove unit files—do not remove software a later task still needs.
Persistence notes (EX200 scoring)
Successful dnf install / remove writes to the RPM database and filesystem— survives reboot by design.
You do not need a special “enable package at boot” step for packages themselves.
You do need reboot-safe config for services you start with packages—but that is systemctl enable , not DNF.
Always leave time to run rpm -q on required packages before the final submit mindset; if you removed the wrong dependency tree, fix it before time expires.
Common traps
Installing the wrong similar name ( httpd vs a docs-only package)—read dnf info .
Using rpm -i and missing dependencies —switch to dnf install .
Assuming yum is gone —it may still work as a front end; both skills transfer, but learn dnf .
Forgetting to verify removal — rpm -q still shows the package if remove failed.
Updating blindly in a timed exam —only update when the task asks or when required to fix deps.
Confusing package name with binary name — dnf provides / rpm -qf .
Section checkpoint
You should search repositories, install and remove packages with DNF (including local RPM files), update when required, query the RPM database with rpm -q and related switches, interpret basic rpm -V output, and confirm package state that still holds after reboot. That completes the RPM half of EX200 software management before Flatpak.