A Linux server only stays reliable if it is kept up to date and rid of what it no longer needs. This block teaches you to install software through the package manager, to apply security updates and to clean up the system regularly. These are everyday moves for any administrator.
Why this block exists
Installing a package looks trivial, but understanding what happens behind it (apt, dnf, dependencies, repositories) avoids costly mistakes in production. This block covers the full life cycle of a piece of software on the system:
- understand: what a package, a repository and a dependency are;
- act: install, remove, update;
- maintain: clear the caches, remove orphan packages, free space.
The recommended path
The guides follow the life cycle of a piece of software on the machine: you first understand where packages come from, then you install and remove them, before keeping them up to date and cleaning up what is left.
1. Understand the package system
The guide to understand packages sets out how software is distributed on Linux: packages, repositories, dependencies and signatures, which guarantee that what you install really comes from the distribution's publisher.
2. Install and remove software
The guide to install and remove software puts it into practice on both families: apt install and apt remove on Debian and Ubuntu, dnf install on RHEL and its derivatives, with what each command does to the dependencies.
3. Update and clean up
The guide to system updates teaches you to apply security patches, plan them and check what has changed. The one to clean and maintain removes orphan packages, clears caches and frees the disk space that successive updates end up taking.
Key points
- A package holds a piece of software plus its metadata (version, dependencies, scripts).
- The package manager (
aptordnf) handles installation, updates and removal. - Repositories are servers that host packages: never add an unknown repository.
- Security updates must be applied regularly, not "one day, when I have time".
apt autoremoveanddnf autoremoveclean up orphan dependencies.