Lesson 13 — Package Management Basics

CompTIA Cyber Path • Linux / Admin Basics • Lesson 13

Lesson 13 — Package Management Basics

apt + dnf + yum + install / update / remove

Package management is how Linux systems install, update, remove, and verify software. This lesson teaches a clean workflow using common package managers: apt on Debian and Ubuntu-based systems, and dnf or yum on many Red Hat-based systems. The goal is not random command memorization. The goal is knowing how software gets managed safely.

Core idea:

Good package management follows a simple pattern: identify the distrosearch for the packageinstall or update itverify the resultremove it cleanly if needed.

What you’ll be able to do:

Recognize which package manager a system uses, update package lists, install software, upgrade packages, remove software, and understand why admin privileges are usually required.

Linux basics apt + dnf + yum install + update + remove local progress saved
Progress: 0%
Identify DistroDebian/Ubuntu or RHEL-family
Search or Refreshapt update / package search
Install or Upgradeapt install / dnf install
Verify or Removeversion check / remove package
Good workflow: What system is this?What package do I need?Install or update it safelyConfirm the result

Lesson Objectives

By the end of this lesson

  • Recognize common Linux package managers
  • Update package lists or metadata
  • Install and upgrade software safely
  • Remove software when no longer needed
  • Follow a clean package troubleshooting sequence

Why this matters

  • Software on Linux is usually managed through packages, not random downloads
  • Updates can improve security, reliability, and compatibility
  • Knowing the package manager helps you troubleshoot missing tools quickly

1) Know the Package Manager

Debian / Ubuntu style

Many Debian-based systems use apt for package management.

sudo apt update sudo apt install curl

RHEL / Fedora style

Many Red Hat-based systems use dnf or older yum.

sudo dnf install curl sudo yum install curl

Why this matters first

Before installing anything, you need to know what family of Linux you are working on. The same goal exists across systems, but the commands differ.

Important habit:

Do not paste commands blindly from random websites. First identify whether the system is Debian/Ubuntu style or Red Hat/Fedora style.

2) Update Package Information

Before installing or upgrading software, refresh package information so the system knows what versions are available.

Debian / Ubuntu

sudo apt update

This refreshes package lists. It does not install updates by itself.

RHEL / Fedora

sudo dnf check-update

This checks what updates are available on many dnf-based systems.

Common confusion

On Debian-style systems, apt update refreshes package information, while apt upgrade actually upgrades installed packages.

3) Install and Upgrade Packages

Installing software through the package manager is safer and more consistent than manually downloading random files.

Install a package

sudo apt install curl sudo dnf install curl

This installs the package and usually pulls in needed dependencies automatically.

Upgrade installed packages

sudo apt upgrade sudo dnf upgrade

This updates installed software to newer available versions.

Search for a package

apt search nginx dnf search nginx

Searching first is useful when you are not fully sure of the package name.

Real-world habit:

Search first, then install. Guessing the wrong package name wastes time and can confuse beginners.

4) Remove Packages Cleanly

When software is no longer needed, remove it using the package manager instead of just deleting random files.

Debian / Ubuntu

sudo apt remove curl sudo apt purge curl

remove typically removes the package. purge is often used when you also want related configuration removed.

RHEL / Fedora

sudo dnf remove curl sudo yum remove curl

This removes the package in many RHEL-family systems.

5) Fast Troubleshooting Pattern

  1. Identify what Linux family you are on
  2. Refresh package information if needed
  3. Search for the package name
  4. Install or upgrade using the correct manager
  5. Verify the tool now exists or the version changed
sudo apt update apt search curl sudo apt install curl curl –version

Practical — Install or Verify a Tool

This practical teaches a real support workflow instead of random command memorization.

Practical Task

  • Identify which package manager your system uses
  • Refresh package information if appropriate
  • Search for a tool such as curl or nginx
  • Install the package or confirm it is already installed
  • Write one sentence describing what you did and what you verified

Walkthrough

sudo apt update apt search curl sudo apt install curl curl –version

On a dnf-based system, the workflow is similar but uses dnf instead of apt. The goal is the same: refresh, search, install, then verify.

Example Ticket Note

Verified package manager on host, refreshed package metadata, confirmed curl package availability, installed package successfully, and verified command output using curl --version.

Write Your Observation

Use a simple note like a junior admin would write.

Mini Knowledge Check

Score 75% or higher to unlock the next lesson link. Your score is saved on this browser.

1) Which package manager is commonly used on Debian and Ubuntu systems?

2) What does apt update mainly do?

3) Which command is an example of installing software?

4) What is a strong package management habit?

Next Lesson

🔒 Locked until quiz ≥ 75% and you mark complete
Lesson 14 — Logs, Disk & System Health Basics

Tip: update the next lesson link when your page exists.

Leave a Comment