ElectronicZoologyfield notes from the garage
Going Deeper

What's a package manager?

On Windows, installing a program usually means going to a website, downloading an installer, double-clicking it, watching it ask for permissions, ticking through screens, sometimes catching it trying to install three other things you didn't want. Updating it means doing that again later. Removing it means hunting in the control panel and hoping the uninstaller is honest.

Linux works differently. There's a single tool that knows about every piece of software you might want to install. Type one command, the software gets pulled from a trusted source and installed. Type another command, everything on your machine gets updated at once. Type one more, it's gone cleanly. That tool is the package manager.

How it works

The distro maintains a repository, which is just a curated catalogue of software, hosted on servers run by the project. Tens of thousands of packages, all built and tested to work with that distro, all kept up to date by maintainers. Your package manager talks to the repository, fetches what you ask for, checks it's signed by the right key, and installs it.

It also tracks dependencies. Most software needs other software to run. A photo editor might depend on a particular image library. A game might depend on a particular sound system. The package manager works out what's needed, fetches it all in one go, and remembers what was installed for what. When you remove the photo editor later, the package manager can also remove the bits that were only there to support it.

The result is a system that stays clean. No leftover folders. No orphaned registry entries. No DLL hell. Software comes in clean and goes out clean.

The big ones

Different distros use different package managers. They all do the same job, just with different commands.

apt. Debian, Ubuntu, Mint. The most common. sudo apt install firefox installs Firefox. sudo apt update && sudo apt upgrade updates everything on the system. Mature, reliable, used by huge numbers of people, which means almost every problem you might hit has been solved on a forum somewhere.

pacman. Arch and its derivatives. Faster, more terse. sudo pacman -S firefox installs Firefox. sudo pacman -Syu updates everything. The flags are cryptic at first but you remember them quickly.

dnf. Fedora, Red Hat, Rocky. sudo dnf install firefox. Similar feel to apt.

If you start with Mint, you'll be using apt. You'll also have a graphical software centre that wraps apt in a clickable interface for the times you don't want to type anything.

Why it's better

Three reasons that matter day to day:

It's safer. Because the package comes from your distro's repository, you know it's been built and signed by people who maintain that distro. You're not downloading a random installer from a random website hoping it's the real thing. The supply chain is short and verifiable.

It updates everything at once. One command updates your browser, your media player, your image viewer, your office suite, your kernel, all at the same time. No app sitting in a corner asking to be updated. No mystery about what's current and what isn't.

It cleans up after itself. Programs leave when you tell them to leave. The system stays the size it should be. After three years on the same install, you don't have a hard drive full of orphaned stuff you can't find or remove.

The exceptions

Two things to know.

First, not every piece of software is in your distro's repository. Some commercial apps, some niche tools, some things that move faster than the repository can keep up with. For those, Linux has alternative formats. Flatpak, Snap, and AppImage are three different ways of distributing software that works across distros, sandboxed from the rest of the system. They each have trade-offs, but they fill the gap when the official repository doesn't have what you need.

Second, on Arch specifically there's the AUR, the Arch User Repository. A community-maintained collection of build scripts for almost any piece of software that exists. If something isn't in the official Arch repository, it's almost certainly in the AUR. It's one of the reasons people stay on Arch once they get there.

← Back to the Linux primer