Loading...

Lab 71: System Updates and Repos

Practice the update workflows and repository visibility checks you use to keep systems patched and predictable across major Linux families. Inspect RPM metadata, install packages on yum-based and Arch systems, and run safe Debian-style update and upgrade sequences.

packages updates repos

Scenario

You are responsible for installing and updating software across a mixed fleet. Your task is to inspect RPM package metadata, install a package using yum, update a Debian-based system using apt, list enabled repositories on a yum-based system, and install a package on an Arch-based system using pacman.

Operator context

Patch work fails most often due to missing repo access, incorrect assumptions about which package manager is in use, or skipping the “inspect before install” step. This lab reinforces repeatable commands you can run quickly on unfamiliar systems.

Objective

  • Query an RPM file to review package metadata before installation.
  • Install a package using yum.
  • Update package lists and upgrade installed packages using apt.
  • List enabled repositories using yum repolist.
  • Install a package using pacman.

What You’ll Practice

  • Reading RPM metadata using rpm -qpi to confirm name/version/summary before installation.
  • Installing packages using yum install in a non-interactive workflow.
  • Running the standard Debian update flow: apt update then apt upgrade.
  • Verifying repository availability using yum repolist.
  • Installing packages on Arch systems using pacman -S.

Walkthrough

Step 1 : Query an RPM file to inspect metadata.
Command
rpm -qpi sample.rpm

Use this when someone hands you an RPM and you need quick clarity on what it is before installing it.

Name        : sample
Version     : 1.0
Summary     : Example RPM package
Description : This is a sample RPM for training purposes.
Step 2 : Install a package using yum.
Command
sudo yum install -y nano

The -y flag is common in automation so the install can proceed without prompting.

Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
--> Installing : nano-2.9.8-1.el7.x86_64
Installed:
  nano.x86_64 0:2.9.8-1.el7
Complete!
Step 3 : Update and upgrade packages on a Debian-based system.
Command
sudo apt update && sudo apt upgrade -y

This is the standard two-phase workflow: refresh package indexes, then apply upgrades.

Hit:1 http://deb.debian.org/debian stable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
Upgrading...
Fetched 12.3 MB in 5s (2,360 kB/s)
Done.
Step 4 : List enabled repositories on a yum-based system.
Command
yum repolist

Repository visibility is a fast way to diagnose why a package cannot be found or why an update is failing.

Loaded plugins: fastestmirror
repo id                  repo name                                 status
base/7/x86_64            CentOS-7 - Base                           10,019
updates/7/x86_64         CentOS-7 - Updates                        1,002
extras/7/x86_64          CentOS-7 - Extras                           500
Step 5 : Install a package with pacman on an Arch-based system.
Command
sudo pacman -S neofetch

Pacman resolves dependencies and prompts before installing. You should recognize the flow and know where to confirm.

resolving dependencies...
looking for conflicting packages...

Packages (1) neofetch-7.1.0-2

Total Installed Size:  0.20 MiB
:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring
(1/1) verifying package integrity
(1/1) loading package files
(1/1) checking for file conflicts
(1/1) installing neofetch

Reference

  • rpm -qpi <file.rpm> : Query RPM package metadata from a file (name, version, summary, description).
  • yum install -y <pkg> : Install a package on yum-based systems (non-interactive with -y).
  • apt update : Refresh Debian package indexes.
  • apt upgrade -y : Upgrade installed packages (non-interactive with -y).
  • yum repolist : List enabled repositories and package counts.
  • pacman -S <pkg> : Install a package on Arch-based systems.