We may earn a commission if you make a purchase through the links on our website.

Best Linux Package Managers

Best Linux Package Managers

Diego Asturias UPDATED: October 7, 2022

The operation and architecture of the different Linux Package managers will vary from distribution to distribution. But generally, all Linux package managers should help install, remove, update, audit, and solve challenging dependency and software version issues.

In this post, we’ll review the best and most popular Linux Package Managers. These include yum, DNF, apt, Pacman, zypper, Portage, and a few other honorable mentions.

Here is our list of the best Linux Package Managers:

  1. YUM An old-time RPM font-end favorite, known and understood by many but slowly being replaced by DNF.
  2. APT A popular DPKG front-end with a complete dependency resolution and package management.
  3. Pacman A popular Arch-Linux package manager that allows using a pre-built package or build-it-yourself.
  4. Zypp/Zypper A popular front-end to RPM used in OpenSUSE and SUSE Linux Enterprise. Zypper is knowns for its SAT solver, a fantastic dependency issue solution.
  5. DNF The popular replacement for yum. It is now the default package manager in Fedora 22 and Red Hat Linux 8.
  6. Gentoo’s Portage Portage provides a fantastic way to manage packages to one of the most flexible yet challenging Linux distributions.
  7. Honorable Mentions We add three honorable mentions to our best Linux Package manager list: eoPKG, NIX, and Snap.

A package and its manager

Packages were created to simplify software distribution and installation. In addition, they solve the challenging and tedious work of having to compile software and handle all its dependencies.

A package is a compressed file archive or collection of files to perform a specific task or application. It contains:

  • Precompiled software Binary executable files to allow end-users easy software installation.
  • Metadata A small file is providing the version number and description (metadata) of the program.
  • A list of dependencies The information on the required programs and versions. Dependencies are needed for the packaged software to work correctly.

Linux-based computers depend on packages that can be managed via software repositories. Packages control the inclusion, maintenance, and removal of programs on a computer.

Common examples of different Linux-based package formats are RPM and DEB. These are both archive files with metadata attached to them. For example, RPM is used for Red Hat distributions and DEB for Debian-based distributions.

When Linux packages start piling up, their dependencies and versions of dependencies become more complex and often unmanageable; you’ll need to use a package manager.

a. The package manager

A package manager, also known as a package management system, allows you to install, configure, audit, upgrade, or remove software packages from your Linux operating system. 

On a basic level, package managers follow a similar process, which starts by:

  • Launching software that reads from a repository
  • Determining the software to install, remove, or update

Package managers should automatically identify the “lacking” dependencies and download all the necessary packages from a single repository. Although all Linux package managers perform the same fundamental function, which is to maintain the software on a Linux-based machine, they vary according to their architecture, interface, syntax, and format.

b. Pre-built vs. build-it-yourself

Generally, there are three different ways to install software using a package manager. The most popular way is using the pre-compiled (pre-built) software package. Second, you can also use a script that lets you compile, build, or re-compile software. And finally, you can use a combination of both.

  • Most Linux distributions, including Debian, Ubuntu, Red Hat, and Fedora, use Deb and RPM format packages with pre-compiled binaries.
  • Other distributions like Gentoo Linux uses a package management system based on the distribution’s source. This package manager employs the concept of “use flags” to let you choose which software to compile.
  • Arch Linux uses a package manager that combines the two approaches. In addition, it provides more flexibility by allowing you to use default precompiled packages (as deb and rpm) and create, compile, or re-compile packages.

c. Differentiating Features

As mentioned earlier, the essential feature of a package manager is to find, install, maintain and uninstall packages. But package managers do differentiate themselves with a couple of parameters, including: 

  • Package Manager Formats
    The most apparent distinction between package managers is their format. Different package managers were built for specific package formats. For example, package managers like YUM, DNF, and Zypper are based on RPM (Red Hat-based), while package managers like APT, APT-Get are built for DEB packages.
  • Dependency issues and conflict resolution
    Dependency hell is a popular term used by people with complex dependency scenarios. Dependency conflicts occur when a software package has dependencies on other software versions of other packages or libraries. Still, these dependencies depend on different (and often incompatible) versions of the shared software packages. Some Linux package managers help solve these dependency issues and handle conflict resolution, while others simply won’t.
  • Simple package audit
    Some package managers provide the what, who, when, and where to package management. There are different ways to review what packages were installed or removed, when, by who, etc. Some package managers are better for this than others.

The Best Package Managers

The following are considered the most popular and best Linux package managers. Some of these are considered the best due to their large community, and others provide outstanding flexibility.

Our methodology for selecting a Linux package manager

We reviewed the market for Linux package managers and analyzed options based on the following criteria:

  • A batch script system that can string together Linux commands
  • A system that checks dependencies to support package creation
  • Checks to confirm the existence of contributing components
  • A mechanism for including notes
  • Version numbering for packages
  • A free tool because Linux users are used to installing software manually for free
  • A time-saving system that works better than just issuing users with installation instructions

With these selection criteria in mind, we identified a number of handy, free package managers for Linux that are widely used and thoroughly tested through use.

1. Yellow Dog Updater, Modified (YUM)

Yellow Dog Updater, Modified (YUM)

The Yellowdog Updater, Modified (yum), is a command-line package-management utility and front-end for the Red Hat Package Manager (RPM). Although RPM was created to manage packages in Red Hat Linux, it is now used in many Linux distributions including, CentOS, OpenSUSE, Fedora, and more.

Features

  • Automatic updates
  • Package and dependency management
  • Dependency resolution when installing/removing, or updating packages
  • Superb usability, syntax, and informational output

YUM is based and depends on the RPM; thus, it can manage .rpm packages (RPM distributions) from local or Internet-based repositories. Yum is often used in Fedora, CentOS (5 and above), and Red Hat Enterprise (5 and above). Although YUM uses a CLI, many other tools, like YUM Extender (yumex), provide the GUI to YUM’s functionality.

Pros:

  • Offers dependency resolution while installing packages
  • Uses simple and intuitive syntax
  • Can manage packages across many popular Linux distributions

Cons:

  • Could use better API documentation

Example of useful yum’s commands [Refer to yum’s cheat sheet]:

Description Command
Install a packageyum install pkg
Remove a packageyum erase pkg
List all yum actionsyum history list

Verdict: Although yum is still the preferred package manager for rpm-based Linux distributions, some long-standing issues haven’t been fixed. These issues include slow dependency resolutions, excessive memory usage, and undocumented API. So now yum is slowly being replaced by DNF.

EDITOR'S CHOICE

YUM is our top pick for a Linux package manager because it is sponsored by Red Hat – a strong brand in the Linux world and it is widely used, ensuring that its bugs have all been reported and fixed. This package manager doesn’t just operate on RHEL, it is compatible with all of the major distros and it can be used for free. The YUM system can be used at the command line or extended by a GUI interface.

Official Site: https://access.redhat.com/solutions/10154

OS: Linux

2. APT

APT

The Advanced Package Tool (or APT) is the popular command-line manager that handles the installation and removal of software packages for Debian, Ubuntu, and other related Linux distributions.

Features

  • Available commands for searching, managing, and querying information about packages
  • Provides low-level access to “libapt-pkg” and “libapt-inst” libraries
  • A high-level interface tool for package management
  • APT performs a topological sorting. First, it creates a packages list of to-be-installed and removed

APT is the front-end of the Debian Package (DPKG), which is the base package manager for Debian distributions. APT uses DPKG on the back-end to install and remove packages. Aside from managing packages and their dependencies relationships, it also allows sourcing and higher-level versioning management. APT can also get packages from remote locations and deal with more complex dependencies resolutions.

APT vs. APT-get? The apt-get is also another feature-rich CLI front-end version of the DPKG system. APT is the subset of the older command-line tools, apt-get, and apt-cache. It uses the same prefix and is user-friendlier than both tools.

Pros:

  • Supports Debian, Ubuntu, and other popular Linux distributions
  • Is better as a high-level package management tool
  • Uses DPKG to install and remove packages

Cons:

  • Can get complex once more PPA keys and extra repositories are added

Example of useful APT’s commands:

Description Command
Update package databaseapt update
Install a packageapt install
Remove a packagesudo apt remove

Verdict: APT is the preferred package manager for any Debian-based distribution. But using it can get complex once more PPA keys and extra repositories are added.

3. Pacman

Pacman

There are two main reasons why few people would prefer to use Arch Linux: one is because it provides full customization, and two because it comes with an outstanding package manager, known as Pacman.

Features

  • Dependency support
  • Build packages from official repositories
  • Manage your builds. Install or uninstall scripts
  • Sync a local machine with a remote repository
  • Pacman 6.0 includes new features like parallel download support, retry downloads, events for download completion, and more

As mentioned earlier, Arch Linux uses the one-of-a-kind package manager, “pacman,” which allows you to either use a pre-built package (from repositories) or build it yourself from scratch. Pacman includes a set of commands to manage all the Arch-based packages and comes with binary packages to help with a package build. This advanced package manager uses simple compressed files “bsdtar(1) .tar” as a package format and a package database system.

Pros:

  • Can install, remove, and build packages
  • Supports auto-retry for downloads
  • Is truly a unique manager

Cons:

  • Requires Arch Linux

Example of useful Pacman’s commands:

Description Command
Install and update package listpacman -Syu
Uninstall packagepacman -Rsc
Search keywordpacman -Ss

Verdict: Arch Linux distribution focuses on simplicity and versatility. These are why Pacman provides a faster and more straightforward approach to package manager than Debian-based cousin APT-get. The only downside is that Arch Linux requires more time for fine-tuning and knowledge.

4. Zypper

Zypper

Zypp is the main package kit for OpenSUSE and SUSE Linux Enterprise. It is also the package management system that powers the package managers, Zypper and YaST.

Features

  • Zypper is part of mobile Linux distributions Tizen, Sailfish OS, and MeeGo
  • The SAT solver provides the fastest dependency resolution
  • Zypper allows you to configure, add or remove repositories
  • Highly flexible syntax format. You can use commands in full or short format
  • Zypper supports RPM Metadata and YaST2 package repositories

Zypper is the robust command-line (front-end to RPM) package manager for installing, removing, and updating packages, in addition to managing and accessing repositories. It is an open-source project available since openSUSE ver 10.2, Fedora (since Fedora 26), and Tizen.

What makes Zypper stand apart from other package managers is its powerful dependency solution known as SAT solver. When there is a dependency problem, Zypper provides multiple solutions and presents the output using an informative and clean tabular format.

Pros:

  • A great option for mobile Linux distributions such as Sailfish, and Tizen
  • Supports PRM Metadata
  • Is a completely open source project

Cons:

  • Has a small support community

Example of useful Zypp’s commands [Refer to Zypper’s Cheat Sheet]:

Description Command
Install packagezypper install or zypper in
Update a packagezypper update or zypper up
List repositoryzypper repos or zypper lr

Verdict: Zypper is one of the youngest projects. Although the project is in constant development and improvement, its community is still relatively small.

5. DNF

DNF

Dandified YUM or DNF is another RPM front-end, designed to replace yum as the default package manager in Fedora 22 and Red Hat Linux 8. It is also used in CentOS, Mageia, OpenMandriva, and Yocto.

Features

  • DNF maintains almost full CLI compatibility with yum
  • DNF uses external dependency resolver libraries, Libsolv and Hawkey
  • Improved memory-intensive operations
  • Full API documentation is available
  • Runs in Python 2 and Python 3

DNF improves YUM in multiple ways, including performance, conflict dependency resolutions, and easier integrations. In addition, the package manager provides an architecture for extending package management functionality via plugins. There are more than 25 plugins officially already supported by DNF and more on development by DNF’s community.

Pros:

  • Similar to YUM with small quality of life improvements
  • Full API documentation
  • Has over 25 different plugins that extend its capabilities

Cons:

  • Still has a small support community

Example of useful DNF’s commands:

Description Command
Install packagednf install
Remove a packagednf remove
List all repositoriesdnf repolist all

Verdict: DNF was designed to address the deficiencies of yum, and will soon replace it. The landscape for DNF has changed since Fedora, and Red Hat Linux adopted it as its default package manager. Although its community is smaller than yum, its adoption is quickly increasing.

6. Gentoo’s Portage

Gentoo’s Portage

Gentoo is known to be the most challenging and distinctive Linux distribution out there. It is believed to be the same as Linux From Scratch (LFS), but with the exception that it comes with an exceptional package manager known as Portage.

Features

  • Portage runs on ebuilds. These are text files that identify a specific package and determine how Gentoo should deal with it
  • It uses CFLAGS, which are environment variables used to specify compilation options
  • It gives you the flexibility to change the dependencies for every installed package and choose software versions and upgrade timings
  • An out-of-the-box, fully functional development environment

Portage is Gentoo’s official package manager and software distribution system. It provides outstanding flexibility, which makes it an OS-independent package manager. Although Portage is built for Gentoo, it is also used by Chrome OS, Calculate, and others.

Portage allows package, dependencies, and repository management. It lets administrators fine-tune packages to suit their specific needs, manage config files and multiple slots for different versions of the same software.

Pros:

  • Runs on ebuilds to identify different packages
  • Is ready to run out of the box
  • Allows for various fine-tuning

Cons:

  • Is more complicated that some other Linux Package Managers

Example of useful Gentoo’s commands:

Description Command
Update softwareemerge --sync
Install a packageemerge package
Update all packages in the systememerge -uD @world

Verdict: Portage is considered one of the most advanced package management systems. But starting with Gentoo Linux can be challenging. Gentoo doesn’t come with pre-compiled software and management tools, so you must configure everything from scratch.

7. Honorable Mentions

Below are three honorable mentions for Linux Package Managers. 

  • eoPKG
    Solus, an Arch-based Linux distribution, uses a package management system know as eoPKG (evolve OS package). eoPKG is based on PiSi (Packages Installed Successfully as Intended), the package manager from Pardus Linux.
  • NIX
    A cross-platform package manager with a unique approach to package management and system configuration. The NIX package manager is the foundation of the NixOS Linux distribution.
  • Snap or Snappy
    Canonical, the company responsible for Ubuntu, develops Snap, an alternative way to manage packages. Snap can be used in Ubuntu, as well as other Linux distributions. Snap uses Snaps, the containerized software packages that are easy to build and deploy.

Final Words

A package manager would not make you change to an entirely new distribution, but it does make a big difference. After all, package managers simplify installing, updating software on Linux, and even dealing with the dependency hell.

We went through the best and most popular Linux Package managers in this post, including YUM, APT, Pacman, Zypp/Zypper, DNF, and Gentoo’s Portage.

Which one is your favorite package manager?

Please leave your comments below.

Linux package manager FAQs

What is Linux package manager?

A package manager that runs in Linux will group together the steps needed to install a piece of software. A software package might need system services to be activated or operating system settings to be changed in order to work properly. In order to ensure that the user doesn’t overlook these prerequisites, the software producer can create a package that performs system adjustments as part of the software installation process. The software might also require supporting programs and drivers to be installed and these can be bundled together with the software and installed automatically in sequence, according to dependencies by the package. The package manager is the system that creates these packages.

Is Yum a package manager?

YUM stands for Yellow Dog Updater, Modified. This system was created by Red Hat for its Red Hat Enterprise Linux (RHEL) operating system. This tool is the primary package method for installing RPM package. The package manager is also compatible with other distros of Linux, such as Fedora and CentOS. The packages created with YUM can update and remove software as well as install it.

What are the types of Linux packages?

There are five package types and each has a distinctive file extension. These are:

  • RPM packages (. rpm)
  • Debian packages (. deb)
  • TAR archives (. tar)
  • TGZ archives (. tgz)
  • GZip Archives (. gz)