Package Manager
Also known as: Package management system
Tool that automates installing, upgrading, configuring and removing software packages and their dependencies from shared repositories.
A package manager is a tool that installs software and keeps track of it. Software is distributed as packages, archives containing code or binaries along with metadata such as a name, a version and a list of dependencies. When asked to install a package, the manager downloads it from a repository, works out which other packages it requires, installs those in compatible versions and records what was installed so that it can later be upgraded or cleanly removed. Without such tools, users would have to find, download and configure each component by hand.
Two broad kinds exist. System package managers, such as APT and dpkg on Debian and Ubuntu, DNF on Fedora and pacman on Arch Linux, install applications and libraries across an operating system; Homebrew and winget fill similar roles on macOS and Windows. Language package managers, such as pip for Python, npm for JavaScript and Cargo for Rust, manage the libraries used by individual projects. The Comprehensive Perl Archive Network (CPAN), launched in 1995, was an influential early example of a large language package repository. Lock files record exact versions so that builds can be reproduced.
Package managers make it trivial to reuse open source code, which is one reason projects commonly depend on hundreds of packages, many of them indirectly. That convenience creates fragility. In 2016 the removal of left-pad, an eleven-line npm package, broke builds for many JavaScript projects, and attackers have published malicious packages with names resembling popular ones or taken over abandoned projects, forms of software supply chain attack. Signed packages, checksum verification and dependency audits are standard defenses, and tools such as Nix pursue fully reproducible builds.
Key points
- A package manager downloads software from repositories, resolves dependencies and tracks installed versions.
- System package managers handle an operating system's software, while language package managers handle project libraries.
- Lock files pin exact dependency versions so that builds can be reproduced reliably.
- Public package registries are targets for supply chain attacks such as malicious look-alike packages.
Related entries
Semantic Versioning
Versioning convention that encodes compatibility in MAJOR.MINOR.PATCH numbers, signaling breaking changes, added features and bug fixes.
Software Library
Collection of prewritten, reusable code, such as functions and classes, that programs call on to perform common tasks without reimplementing them.
Operating system assembled from the Linux kernel, system software, applications, a package manager and an installer, maintained as one product.
Volunteer community, founded in 1993, that develops Debian, a free operating system and one of the oldest and most influential Linux distributions.
Software Supply Chain Attack
Attack that compromises software by tampering with its dependencies, build systems or update channels, so trusted code delivers malicious changes to users.
Reproducible Builds
Practice of making software builds deterministic so anyone can rebuild published binaries from source and get bit-for-bit identical results.
NixOS
Linux distribution built on the Nix package manager that describes the whole system in declarative configuration and supports atomic upgrades and rollbacks.
Open Source
Approach to software in which source code is published under a license that lets anyone inspect, modify and redistribute it.
Referenced by
Other entries that discuss or point to Package Manager.