Installing, updating and removing software.
THE PACKAGE MANAGERS
apt on Debian and Ubuntu dnf on Rocky, AlmaLinux and recent Fedora
Both do the same things with different command names.
THE OPERATIONS
Refresh the package list Install a package Remove a package Update all packages Search for a package Show information about a package
WHY USE THE PACKAGE MANAGER
Packages come from the distribution's repositories, are tested together, and receive security updates. Software installed by downloading and compiling manually does not, and becomes your responsibility to track.
THIRD-PARTY REPOSITORIES
Sometimes necessary for newer versions than the distribution provides. Add only repositories you trust, and be aware they can conflict with distribution packages.
CLEANING UP
Package caches accumulate and consume disk space. Clean them periodically.
Remove packages you no longer use. Every installed package is potential attack surface and something to patch.
CHECKING WHAT IS INSTALLED
List installed packages periodically and ask whether each is still needed.