CertGrid CertGrid
Hands-on Lab·Linux Foundation Certified System Administrator

Repositories, and where packages come from

A package manager can only install what a repository offers, and most package failures are really repository failures. This guide reads the source files on both families, adds a repository that does not answer to see how each reacts, and holds a package back from upgrades.

Operations Deployment Guide 12 of 38 Beginner

Ubuntu 26.04 uses the deb822 .sources format, and this host has both that and one old-style .list file live at once. RHEL 10 uses .repo ini files in /etc/yum.repos.d/. The RHEL repositories in this lab are local (file:///var/www/html/rhel10/), not network mirrors.

Every command run on both hosts, Ubuntu first. The two transcripts are interleaved so you can see the same question asked of each family.
Server NameIP AddressOSRolesCPURAMHDD
LFCS-A01192.168.0.70Ubuntu 26.04 LTSPrimary host - most guides run only here2 Core4 GB50 GB
LFCS-C01192.168.0.72AlmaLinux 10.2The other distribution - dnf, firewalld and NetworkManager2 Core4 GB50 GB

This guide includes

Use this because a package manager can only install what a repository offers. This matters because the package list is a downloaded copy - a stale cache is why an install fails for a package that plainly exists.

Before you start

  1. Where the sources are written down

  2. One repository, in full

  3. The metadata cache, and why it goes stale

  4. Adding a repository that does not answer

  5. Holding a package back

  6. What is waiting to be upgraded

Official sources