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.
Good package management follows a simple pattern: identify the distro → search for the package → install or update it → verify the result → remove it cleanly if needed.
Recognize which package manager a system uses, update package lists, install software, upgrade packages, remove software, and understand why admin privileges are usually required.
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.
RHEL / Fedora style
Many Red Hat-based systems use dnf or older yum.
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.
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
This refreshes package lists. It does not install updates by itself.
RHEL / Fedora
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
This installs the package and usually pulls in needed dependencies automatically.
Upgrade installed packages
This updates installed software to newer available versions.
Search for a package
Searching first is useful when you are not fully sure of the package name.
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
remove typically removes the package. purge is often used when you also want related configuration removed.
RHEL / Fedora
This removes the package in many RHEL-family systems.
5) Fast Troubleshooting Pattern
- Identify what Linux family you are on
- Refresh package information if needed
- Search for the package name
- Install or upgrade using the correct manager
- Verify the tool now exists or the version changed
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
curlornginx - Install the package or confirm it is already installed
- Write one sentence describing what you did and what you verified
Walkthrough
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
Tip: update the next lesson link when your page exists.