Guide to Linux Packages

Linux packages streamline software installation, maintenance, and removal

A package delivers and maintains new software for Linux-based computers. Just as Windows-based computers rely on executable installers, the Linux ecosystem depends on packages that are administered through software repositories. These files govern the addition, maintenance, and removal of programs on the computer.

What Is a Package?

A package consists of a collection of files that perform a task. For example, the popular image editing program, GIMP, distributes through a package. Within it, all the files that GIMP needs to run appear in a tidy archive. In addition, the package offers a small file that provides important metadata about the program.

Tux the penguin is the official Linux mascot.
 John Coulter / Getty Images

Why Packages?

Because each Linux computer or server uses different software—including different kernels—developers cannot guarantee that a "Linux program" will run correctly on any given computer. To fix this interoperability problem, packages include a manifest of dependencies, or lists of programs and versions that must be satisfied for the packaged software to run correctly on a given computer.

How Do I Use Packages?

Linux supports several major different types of package managers. Each performs the same basic function of installing and managing new programs, but each uses a slightly different under-the-hood architecture and different user interfaces to perform the package-manager's core tasks.

Common package-management systems include:

  • DPKG: The base package manager for Debian-based distributions.
  • Apt: A front-end for the DPKG system, found in Debian-based distributions, such as Ubuntu, Linux Mint, and Elementary OS.
  • Apt-get: A more feature-rich front-end for the DPKG system, found in Debian-based distributions.
  • RPM: The base package manager found in Red Hat-based distributions, such as Red Hat Enterprise Linux, CentOS, and Fedora.
  • Yum: A front-end for the RPM system, found in Red Hat-based distributions.
  • Dnf: A more feature-rich front-end for the RPM system.
  • ZYpp: Found in SUSE and OpenSUSE.
  • Pacman: The package manager for Arch Linux-based distributions.

Regardless of the specific package manager, the process of maintaining software on a Linux-based computer is generally the same. You launch a software catalog that reads from one or more repositories (archives of software optimized for a given platform). Pick-and-choose which software to install or un-install through the graphical catalog, or use a shell session to execute the commands manually.

What is an Alternative to a Package?

Although packages remain the tried-and-true method of distributing Linux software, in recent years alternative technologies aim to simplify software management. For example, the new Snap format treats programs as self-contained, isolated objects that run in their own protected space, so they aren't "dependent on dependencies."

In addition, the really old-school method of software installation requires compilation from source. This process is less common than it used to be, although Linux veterans and Slackware aficionados still do it. A compilation-from-source installation requires that you obtain the actual code for a program, which you then compile and install on your own computer. This process is, in theory, more efficient—the installation is optimized for your specific computer—but it's generally a power-user strategy for people accustomed to developing their own software.

Was this page helpful?