Skip to content
hostcomplex

Linux Package Managers

Maarten Soetens 3 min read

What a Linux Package Manager Does

A Linux package manager is a tool that installs, updates, configures and removes software from a collection of trusted packages. Rather than downloading installers from individual websites, the system fetches software from repositories maintained by its distribution, which is one of the defining features of a distribution.

A package is an archive that contains program files, configuration templates and metadata such as the version number, description and dependencies. A dependency is another package a program needs in order to run. The package manager finds dependencies, downloads them and installs everything in the right order. Packages are also signed with cryptographic keys, so the system can verify that they came from the distribution and were not changed. For how distributions bundle these tools, see what a Linux distribution is.

How Repositories and Updates Work

A repository is a server that hosts packages for a distribution, grouped into collections such as core system software, supported applications and security updates. The package manager keeps a local index of what is available. When you run an update, it refreshes that index and then upgrades installed packages to newer versions from the repositories configured on the system.

This central model is a major reason Linux servers are easy to keep patched. Security fixes arrive through the same channel as other updates, and one command can refresh the whole system. It also explains why third-party repositories need care: each one adds software the distribution does not vouch for. Once a release reaches the end of its support, its repositories stop receiving updates, as described in what end of life means for servers.

APT, YUM and DNF Compared

Each distribution family pairs with its own package manager and package format:

  • APT (Advanced Package Tool): used by Debian, Ubuntu and their derivatives. It manages .deb packages, which the lower-level dpkg tool installs.
  • YUM (Yellowdog Updater, Modified): the long-standing manager for Red Hat-family systems. It manages RPM packages.
  • DNF (Dandified YUM): the successor to YUM, used by Fedora and by recent RHEL releases and their rebuilds. It keeps most of YUM's commands and concepts while improving dependency handling.

The package formats are not interchangeable. A .deb file will not install on an RPM-based system, which is why vendors publish separate builds. Administrators who learn one manager usually find the others familiar, since installing, removing, updating and searching work in similar ways.

Frequently asked questions

Which package manager is best for a server?

None is better in general. The right package manager is the one that comes with your distribution. Debian and Ubuntu use APT, while Red Hat family systems use DNF or YUM. Choose the distribution first, then use the package manager it provides.

Is a package manager the same as an app store?

The two are similar in purpose but different in scope. Both deliver software from a curated catalog, but a Linux package manager also resolves dependencies, updates system libraries and keeps the whole operating system consistent. Language-specific tools for programming libraries are a separate topic.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.