Use yum to verify repositories, discover packages,
identify file ownership, review transaction history, and perform
safe repair workflows. Practice the commands you use on RHEL-family
systems when you need evidence first and changes second.
You are onboarding to a RHEL-like system where you must use
yum to verify repositories, discover packages,
identify which package owns a specific file, review transaction
history, and perform safe package management actions. Your goal
is to complete common workflows you will use when troubleshooting
real servers.
Treat yum as an evidence tool as much as an
installer. Confirm repos and metadata first, then make
targeted changes only after you can explain what will happen
and why.
yum info.
yum provides / yum whatprovides.
search to find candidates,
info to validate, then act.
yum provides lets you tie a symptom on disk to
the package you can repair.
yum history gives provenance: what changed, when,
and which transaction likely caused a regression.
yum repolist
Repos are your supply chain. If a repo is missing, disabled, or stale, package discovery results will be misleading.
repo id repo name
appstream Rocky Linux 9 - AppStream
baseos Rocky Linux 9 - BaseOS
extras Rocky Linux 9 - Extras
bash is installed.
yum list installed bash
This confirms a package is installed and shows where it came
from. For broader matches, use wildcards like
'*bash*'.
Installed Packages
bash.x86_64 5.1.8-6.el9 @baseos
yum search http server
Use yum search to discover candidates quickly.
It matches package names and summaries.
==================== Name & Summary Matched: http =====================
httpd.x86_64 : Apache HTTP Server
mod_ssl.x86_64 : SSL/TLS module for the Apache HTTP Server
httpd.
yum info httpd
This shows version, release, repo source, and summary. You typically check this before installing or debugging dependencies.
Available Packages
Name : httpd
Version : 2.4.57
Release : 8.el9
Arch : x86_64
Repo : appstream
Summary : Apache HTTP Server
/usr/bin/top.
yum provides /usr/bin/top
This is a core admin workflow: map a file on disk to the owning package so you can choose a targeted repair action.
procps-ng-3.3.17-13.el9.x86_64 : System and process monitoring utilities
Repo : baseos
Matched from:
Filename : /usr/bin/top
yum check-update
This is your non-invasive “what would change” view. It’s useful for planning maintenance windows and spotting security-relevant updates.
curl.x86_64 7.76.1-26.el9_4 baseos
openssl-libs.x86_64 3.0.7-25.el9_4 baseos
yum history
History answers “what changed and when.” It’s critical when debugging regressions after updates or reconstructing actions during an incident.
ID | Command line | Date and time | Action(s) | Altered
12 | install vim-enhanced | 2026-01-02 12:20 | Install | 1
11 | update | 2026-01-01 09:10 | Update | 14
bash as a repair workflow.
Reinstall is a safe, targeted repair when you know the owning package and suspect file loss or corruption.
sudo yum reinstall -y bash
This restores packaged files from repos while respecting config handling rules.
Dependencies resolved.
Reinstalling:
bash.x86_64 5.1.8-6.el9 baseos
Complete!
yum clean metadata
Use this when you suspect stale or broken metadata. It forces a fresh metadata fetch on the next operation.
0 files removed
yum repolist
Quick verification that your repo view is still sane after cleanup and package operations.
repo id repo name
appstream Rocky Linux 9 - AppStream
baseos Rocky Linux 9 - BaseOS
extras Rocky Linux 9 - Extras
If repos are missing or disabled, discovery and installs will
fail or look incomplete. Fix repo configuration first, then
re-run yum repolist.
Ensure you are using the full path and that repos/metadata are available. If the file is local and not packaged, there may not be an owning RPM.
That can be normal as mirrors update. Treat it as a snapshot and re-check close to your maintenance window.
Confirm repos are visible and that your package tooling is in a healthy state.
yum repolist
yum history | head -n 15
yum clean metadata
Repos are listed, history is available, and metadata cleanup completes without errors.
yum repolist
: Lists enabled repositories.
enabled
: Show enabled repos explicitly.
yum list installed <name>
: Show installed packages matching a name or pattern.
yum search <terms>
: Search package names and summaries for keywords.
yum info <pkg>
: Display package metadata (version, release, repo, summary).
yum provides <path>
: Find which package provides a specific file path.
whatprovides
: Alias for provides (same intent).
yum check-update
: List available updates without installing.
yum history
: Show transaction history and change provenance.
yum reinstall <pkg>
: Reinstall a package to restore packaged files.
yum clean
: Remove cached data to force fresh repo information.
metadata
: Remove repo metadata only.
all
: Remove metadata and cached packages.