package manager

A tool that installs, updates and removes software together with what it depends on, such as apt on Debian, apk on Alpine or Homebrew on macOS.

In more detail

It downloads packages from a package repository, installs their dependencies and keeps track of what is installed, so software can be updated or removed cleanly. Each family of Linux distributions has its own, and programming languages have their own too, such as pip for Python and npm for JavaScript.

Examples

The Ansible package module drives whichever package manager the host has.
sudo apt-get install -y bash
sudo dnf install bash
The twelve-factor app calls it the dependency manager: the tool that installs exactly the versions a manifest declares. A program that shells out to a system tool has a dependency no package manager knows about.
RUN apk add --no-cache curl
sudo dnf install git-all
brew install go
the golang container image in pipelines
It is more than an installer: it records which package owns each file, resolves dependencies, checks signed metadata from configured repositories and can upgrade or remove software consistently. apt serves Debian and Ubuntu, dnf serves Fedora and Red Hat Enterprise Linux, and pacman serves Arch Linux. It cannot tell you whether your configuration is right or a third-party repository is wise.
Preview first: apt install --simulate web, dnf install --assumeno web, or pacman -S --print web.
sudo apt install python3-venv
sudo apt-get install terraform
In Terraform: HashiCorp publishes Terraform packages for apt and dnf, and macOS and Windows have their own package managers, Homebrew, winget and Chocolatey. A package manager is the easiest way to install Terraform while learning, but it gives you one version for the whole machine.

Related terms

Taught in

References

Certification courses