3.4. Software and Package Management
Package managers solve the dependency problem: your application needs library A version 2.3, which needs library B version 1.1, which conflicts with library C already installed. Tracking and resolving these relationships manually across hundreds of packages is impossible — package managers exist because it has to be automated.
💡 First Principle: A package is not just files — it's files plus metadata (version, dependencies, scripts, checksums) plus a database entry on your system. When you apt install nginx, the package manager resolves all nginx's dependencies, downloads signed packages from a trusted repository, verifies GPG signatures, runs pre-install scripts, copies files to correct locations, runs post-install scripts, and updates the package database. All of this happens atomically.
⚠️ Common Misconception: Candidates often assume package managers only install software. They also handle upgrades, removals, dependency resolution, security updates, and repository management. The package manager IS the software supply chain — and GPG signature verification is the security control that prevents a compromised package from being installed.
Unmanaged software creates security debt. Every package installed outside the package manager — compiled from source, manually downloaded — bypasses the distribution's security update pipeline. When a CVE drops, patched packages reach managed systems in hours; unmanaged software may never be updated.
Without a package manager, every software install is a manual dependency hunt — and every security update requires finding, downloading, and testing each package individually. A compromised unmanaged binary has no patch pipeline; it simply stays vulnerable.
Think of package management like a warehouse with an inventory system. Without the inventory system (package manager), you can bring in any item you want, but nobody tracks what came in, what it depends on, or how to remove it cleanly. With the inventory system, every install is recorded, dependencies are resolved automatically, and updates flow through a single pipeline.