Objective. Students will install, update, query, and remove software packages using apt (Debian/Ubuntu) and dnf (RHEL/AlmaLinux), verify package integrity, and explain the role of repositories in a controlled data center environment.
This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.
VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.
A package manager is a tool that automates downloading, installing, updating, and removing software on a Linux system. Instead of hunting for installer files manually, you run a single command and the package manager fetches the correct software, checks its authenticity, and resolves any dependencies it needs. In a data center, this consistency is essential: every server must be configured in a known, repeatable state.
Two package managers dominate enterprise Linux:
Both tools perform the same core tasks; the commands differ in syntax.
A repository (repo) is a curated, server-hosted collection of software packages. When you run an install command, the package manager contacts the configured repos, downloads the package, and verifies it before installing. Repos can be hosted publicly by the distribution vendor, by third parties, or internally by your organization.
In a production data center, only approved repositories should be enabled. Unapproved repos introduce two serious risks:
1. Security risk — A malicious or compromised package can open backdoors, exfiltrate data, or disrupt services. This is a supply-chain security concern addressed by standards bodies and change-management policies.
2. Stability risk — Packages from unknown sources may conflict with existing software, break dependencies, or introduce untested behavior on production hardware.
Always follow your organization's change-management policy before adding any new repository. Document every change in your lab log and, in production, in the approved ticketing system.
| Task | Command |
|---|---|
| Update repo metadata | `sudo apt update` |
| Install a package | `sudo apt install <package>` |
| Remove a package | `sudo apt remove <package>` |
| Search for a package | `apt search <keyword>` |
| List installed packages | `apt list --installed` |
| Upgrade all packages | `sudo apt upgrade` |
Always run `sudo apt update` before installing to make sure you are working with current metadata.
| Task | Command |
|---|---|
| Update repo metadata and packages | `sudo dnf check-update` |
| Install a package | `sudo dnf install <package>` |
| Remove a package | `sudo dnf remove <package>` |
| Search for a package | `dnf search <keyword>` |
| List installed packages | `dnf list installed` |
| Upgrade all packages | `sudo dnf upgrade` |
Both apt and dnf verify packages using cryptographic signatures before installation. The distribution maintainer signs each package with a GPG key; the package manager checks that signature against a trusted keyring. If the signature does not match, the installation is refused. You can also verify an already-installed package's files using:
Never bypass signature checks. A failed verification is a red flag for a tampered or corrupted package.
Ubuntu — PPA (Personal Package Archive): `sudo add-apt-repository ppa:<publisher>/<ppa-name>` followed by `sudo apt update`. Only add PPAs that appear in your organization's approved list.
AlmaLinux — EPEL (Extra Packages for Enterprise Linux): `sudo dnf install epel-release`. EPEL is maintained by the Fedora community and is widely accepted in enterprise environments, but must still be approved by your change-management process before being enabled on production systems.
After adding a repo, document the repo URL, the date, the ticket number, and the reason in your lab log.
Data centers operate under strict change-management policies. Before any software change on a production server, a change request is submitted, reviewed, and approved. Package installation is a change. Adding a repository is a larger change because it affects every future install. Violating repository policy can:
In the lab, treat the mock policy document as you would a real one. Read it, follow it, and answer the worksheet questions thoughtfully.
This lesson involves only software commands; there is no electrical or physical hazard at the keyboard. However, running commands with `sudo` grants elevated privileges. A mistyped remove command can delete critical system packages. Before pressing Enter:
These habits protect both the system and your career.
Answer each question, then check it. Nothing is recorded; this is your own practice.
A free tech program — complimentary, as our commitment to get America working. Help us build VoTechWorks. Tell us what works, what doesn’t, and what you want to learn.