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 bashsudo dnf install bashThe 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 curlsudo dnf install git-allbrew install gothe golang container image in pipelinesIt 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-venvsudo apt-get install terraformIn 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
- package module — The module that installs or removes software using whatever package manager the host has, such as apt or dnf.
- Linux distribution — A complete operating system built around the Linux kernel, such as Debian, Ubuntu or Alpine Linux.
- Homebrew — A popular package manager for macOS and Linux, run with the brew command, which installs software into its own directory.
- sudo — A command that runs another command with administrator (root) rights after checking you are allowed to.
- dependency declaration — Listing every dependency an app needs, with exact versions, in a manifest, and isolating the app so nothing else leaks in at run time.
- dependency — Anything a program needs in order to work, such as a library, a tool or another service.
- RUN — The Dockerfile instruction that runs a command during the build and saves the result as a new layer.
- package repository — A server that a package manager downloads software packages from.
- npm — The package manager that comes with Node.js, plus the public registry where JavaScript packages are published.
- pnpm — A fast JavaScript package manager that stores each package version once on disk and has strong built-in support for workspaces.
- minimal base image — A base image with as little inside as possible, such as Alpine, a slim variant or a distroless image, to shrink size and attack surface.
- installing Git — Putting the git program on a computer, which is done differently on each operating system.
- software package — An archive containing a program's files plus metadata: its name, version, dependencies and scripts to run on install or removal.
- package database — The local record a package manager keeps of every installed package, its version and the files it owns.
- dependency resolution — The package manager's work of choosing which packages and versions to install, upgrade or remove so every declared dependency stays satisfied.
- package family — A group of distributions that share one package format and toolset, such as Debian-style (.deb with apt), Red Hat-style (.rpm with dnf) or Arch-style (pacman).
- pip — Python's standard package installer, which downloads packages from the Python Package Index and installs them.
- lockfile — A file that records the exact version of every dependency, including transitive ones, so every install gets the same set.
- winget — The command-line package manager built into current versions of Windows.
- Chocolatey — A community package manager for Windows, used from the terminal with the choco command.
- version manager — A tool that keeps several versions of a program installed and switches between them per project.
Taught in
- Ansible Architecture And The Control Node — Ansible Configuration Management at Scale
- Connections And Privilege Escalation — Ansible Configuration Management at Scale
- Which Shell Am I In, And Getting Bash Five — Bash Scripting & Command Line Automation
- ShellCheck — Bash Scripting & Command Line Automation
- Archives, Transfers And The Network — Bash Scripting & Command Line Automation
- Container Hardening: Distroless & Rootless — Cloud Security & DevSecOps Engineering
- Codebase And Dependencies — DevOps & Site Reliability Engineering
- Why Containers: Bare Metal, Machines And Processes — Docker Architecture & Production Containers
- RUN, SHELL And Efficient Layer Caching — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices
- Containerization Architecture: Multi-Stage Dockerfiles — Production Full-Stack Engineering
- Installing Git, And Telling It Who You Are — Advanced Git Internals & Distributed Workflows
- Installing the Go Toolchain — Concurrent Systems Programming with Go
- Your First Program and go run — Concurrent Systems Programming with Go
- Shipping in Scratch and Distroless Images — Concurrent Systems Programming with Go
- What A Distribution Actually Is — Linux Fundamentals & Systems Administration
- What A Package Manager Guarantees — Linux Fundamentals & Systems Administration
- Three Families: apt, dnf And pacman — Linux Fundamentals & Systems Administration
- Installing Python On A Mac — Hands-on Python: Complete Video Course & Book
- Installing Python On Linux — Hands-on Python: Complete Video Course & Book
- Where Python Lives: PATH And Versions — Hands-on Python: Complete Video Course & Book
- First Run, And Fixing A Broken Install — Hands-on Python: Complete Video Course & Book
- Exam Strategy: Order, Verify, And The Docs You May Use — Red Hat Certified System Administrator (EX200) Exam Prep
- Repositories You Configure By File — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: People, Packages And Time — Red Hat Certified System Administrator (EX200) Exam Prep
- Mock Exam, Part 1: Eighteen Tasks, One Reboot — Red Hat Certified System Administrator (EX200) Exam Prep
- Dependency Risk And Typosquatting — Application Security & Threat Modeling for Engineers
- Software Bill Of Materials — Application Security & Threat Modeling for Engineers
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Image Scanning And Trivy — Application Security & Threat Modeling for Engineers
- Installing Terraform And Meeting The CLI — Infrastructure as Code with Terraform
- Twelve Lines, Ten Warnings: Dockerfile Instructions And hadolint — Docker Certified Associate (DCA) Exam Prep
- One Edited File, Six Rebuilt Steps: Layers, Cache And Flat Images — Docker Certified Associate (DCA) Exam Prep
- One Comma, No Engine: Installing And Configuring Docker Engine — Docker Certified Associate (DCA) Exam Prep
- Security Sprint: Eight Questions On Defaults, Trust And Access — Docker Certified Associate (DCA) Exam Prep
- Ninety Minutes, Two Kinds Of Question: How Linux+ Is Scored — CompTIA Linux+ (XK0-006) Exam Prep
- The App In /bin That Vanished: The FHS, Distributions And Licences — CompTIA Linux+ (XK0-006) Exam Prep
- The Upgrade That Broke Nginx: Packages, Repositories And Pins On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- Clocks, Names, Addresses And Pages: The Services Every Depot Runs — CompTIA Linux+ (XK0-006) Exam Prep
- When awk Runs Out: Python Data Types, Modules And Virtual Environments For Admins — CompTIA Linux+ (XK0-006) Exam Prep
- Patched On Paper: Missing Updates, Broken Chains, Old Protocols And Open Doors — CompTIA Linux+ (XK0-006) Exam Prep
- Three PBQs Against The Clock: A Performance-Based Mock On Both Families — CompTIA Linux+ (XK0-006) Exam Prep
- Packages And Repositories: Find, Install, Hold, Purge — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Remote File Systems: NFS, SMB And Network Block Devices — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Automounters: autofs Maps And systemd Automount — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Disk Full At Three In The Morning — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Drill: From Emergency Mode To A Clean Boot — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Mock Exam, Part 1: Seventeen Tasks, One Reboot — Linux Foundation Certified System Administrator (LFCS) Exam Prep
- Sixty Questions, One Wrong Flag Each — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
- Exam 101 Strategy: Weights, Blanks And Ninety Minutes — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
- Debian Packages: dpkg, apt And The Sources List — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
- RPM, YUM, DNF And Zypper — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
- Graded On A Machine You Never Touched — RHCE in Ansible (EX294): Automate Red Hat Systems
- Exam Strategy: The First Fifteen Minutes And ansible-doc — RHCE in Ansible (EX294): Automate Red Hat Systems
- Anatomy Of A Playbook: Plays, Tasks And Modules — RHCE in Ansible (EX294): Automate Red Hat Systems
- Loops: One Task, Many Items — RHCE in Ansible (EX294): Automate Red Hat Systems
- Conditionals: register, when, changed_when And failed_when — RHCE in Ansible (EX294): Automate Red Hat Systems
- Handlers And Failure: notify, block, rescue And always — RHCE in Ansible (EX294): Automate Red Hat Systems
- Roles: The Directory Ansible Expects, Defaults And Handlers — RHCE in Ansible (EX294): Automate Red Hat Systems
- RHEL System Roles: timesync And selinux From A Collection — RHCE in Ansible (EX294): Automate Red Hat Systems
- Packages And Repositories: yum_repository And dnf — RHCE in Ansible (EX294): Automate Red Hat Systems
- Services And Boot Targets: Started Is Not Enabled — RHCE in Ansible (EX294): Automate Red Hat Systems
- Drill: A Web Node From A Ticket — RHCE in Ansible (EX294): Automate Red Hat Systems
- Mock Exam, Part 2: Real Machines And The Patterns That Fail — RHCE in Ansible (EX294): Automate Red Hat Systems
References
- Debian Reference: Debian package management
- Fedora docs: using DNF
- Alpine Linux user handbook: apk
- Docker Docs: Dockerfile best practices
- ArchWiki: pacman
- Using Python on Unix platforms
- Debian apt(8)
- pip documentation
- Install Terraform
Certification courses
- RHCSA course and practice exam: Red Hat Certified System Administrator (EX200)
- DCA course and practice exam: Docker Certified Associate
- CompTIA Linux+ course and practice exam: XK0-006
- LFCS course and practice exam: Linux Foundation Certified System Administrator
- LPIC-1 course and practice exam: Linux Administrator (101-500 and 102-500)
- RHCE course and practice exam: Red Hat Certified Engineer in Ansible (EX294)