EVOPEDIA

← all systems · see it in The System

Package manager

boundaryInside: the client tool on each machine or project (its request handling, metadata cache, dependency solver, downloader and verifier, installer and local database or lockfile), and the repositories, registries and mirrors it reads with their signed metadata and publishing rules. Outside: the people who ask for software and the maintainers who publish it (Human (Homo sapiens)), the host operating system it changes (Operating system), the code in the packages themselves (Open-source software), the version control systems projects live in (Version control), and attackers who use the channel (Supply chain attack).
nested levelAn operating-system package manager is part of its distribution and runs on the operating system it manages; a language package manager is part of its language's toolchain and ecosystem. Both fetch over the Internet and are the delivery stretch of the software supply chain.
scaletechnological

From the walk

In a 2008 study, researchers set up public mirrors for five major Linux distributions (CentOS, Debian, Fedora, openSUSE, Ubuntu) under a fictitious hosting company with a fictitious administrator, then told the distributions the mirrors were online; all five added them to their official mirror lists, and traffic arrived from a variety of clients, including military and government computers (src:cappos-2008-mirror).

Definition. A client tool and the repositories it reads that together find, fetch, verify, install, upgrade and remove software packages and everything they depend on, keeping a record of what is installed (src:wp:package-manager; src:cappos-2008-mirror; src:abate-2020-dependency-solving). Two kinds dominate: the operating-system kind (dpkg and APT, RPM with YUM and DNF, Pacman, Portage) that manages a whole system's software, and the language kind (CPAN, PyPI with pip, npm, Maven, Cargo, RubyGems) that automates code reuse for one project (src:gamage-2026-lockfiles; src:decan-2019-dependency). Definition drawn from the encyclopedia entry (Wikipedia, CC BY-SA).

On this page: Properties 2 · Measures 36 · Open contentions 4 · Cross-scale patterns 21 · Valence partners 10 · Partners and parts 58 · Notes 3 · Layers 48 · Sources 27

Properties published scienceour proposal

Sourced fields, and our own readings.

born atdpkg by 1994; repository downloads with dependency resolution from about 1995 beginning with CPAN; an AIX tool in 1989 given without citation
born precisionyear

Measures (36) published science

characteristic clock: technical lag of npm releases7 to 9 months (average, for releases with lag, from 2015 on); 25% over 9 months, 25% under 52 days
days a malicious package is available before report209 days on average (median 67, max 1,216; 174 packages, 2015-2019)
left-pad time to republish3 hours
implicitly trusted packages and maintainers per npm install79 packages, 39 maintainers average per installed package (2018)
reach of the top-5 npm packages134,774 to 166,086 packages each (2018)
average npm package reachabout 230 other packages (2018)
event-stream reach5,466 packages (1 April 2018); 1,165 packages had greater or equal reach
event-stream use at takeover1,600 packages; 1.5 million dependent packages; downloads a week
maintainers whose vetting would halve the risk of compromised accountsabout 140 of more than 150,000 maintainers
npm packages depending on publicly known vulnerable codeup to 40 %
median transitive dependencies of a dependent package41 (Cargo), 21 (npm), 27 (NuGet) packages, against a median of 2 direct
share of required packages holding over 80% of reverse dependencies6 (npm, RubyGems) to 17 (NuGet) %
Cargo 5-Impact Index99 packages each transitively required by at least 5% of Cargo (January 2017; over 1.3% of its 7,421 packages)
seven ecosystems' size830k packages, 5,812k releases, 20,509k dependency relations on 1 April 2017 (Cargo, CPAN, CRAN, npm, NuGet, Packagist, RubyGems)
malicious packages that run at install56 % (of 174)
malicious packages injected by typosquatting61 %; average edit distance to the target 2.3
previously unknown malicious packages found and confirmed339 found, 278 confirmed packages (82%)
npm packages hijackable through expired maintainer domains8,494 packages via 2,818 maintainer addresses (1.63 million packages studied)
typosquatting check warnings and overhead0.5% of installs; 2.5% of install time warnings; overhead
signing overhead of layered metadata signatures2-5 % (Stork)
official mirrors obtained with false credentials5 of 5 distributions attempted (CentOS, Debian, Fedora, openSUSE, Ubuntu; 2008)
cost of the attacking mirror$200 a month; 1500 GB server lease and monthly bandwidth quota
Maven upgrades complying with semantic versioning83.4 % of 119,879 upgrades; 20.1% of non-major releases breaking
share of npm libraries that are micro-packagesup to 47 %
lockfile commit rate99.7 (Go), 0.9 (Gradle) % of projects committing the lockfile
Debian packages buildable reproduciblyover 95 % of 30,000+ packages (2021)
share of Maven signing failures that were public-key failures (2023)over 99 %
package managers listed by libraries.iomore than 30 package managers
npm registry sizeover 3.1 million packages
left-pad downloads before removal15 million downloads
maintainers who together reach more than half of npm20 maintainers (collusion scenario, 2018)
maintainers affecting more than 10,000 npm packages391 maintainers (2018; 59 in 2015)
nixpkgs bitwise reproducibility69 to 91 % of 709,816 package builds, 2017-2023, rising; rebuildability over 99%; about 15% of failures from embedded build dates
XZ Utils attack span2.6 years (2021-10-29 to 2024-03-28)
technical lag before and after an update bot48.99 to 25.38 days (npm projects, 90 days after Dependabot adoption; 35.7% reach zero lag)
supply-chain attack vectors, incidents and safeguards in one taxonomy107 / 94 / 33 vectors / real-world incidents / safeguards

Open contentions (4) open contention

Where sources or readings disagree. Both stay on the map.

Cross-scale patterns seen here (21) our proposal

Shapes that recur when the same kind of problem is solved at different scales, and how each shows in Package manager. Each links to every other system that shows it.

Valence: what it trades, and with whom (10) published science

Each exchange with a neighbour, read from both sides: who gains, who pays, and what carries it.

Partners and parts published science

Built from / builds (7)

Sits inside / holds (3)

expressed by (27)

floor filled by (14)

Kinds (5)

wired (2)

Notes published science

Layers

The ways it takes in its world, where they meet, and how it acts back, each from L1 (where it meets the world) up.

package manager as software engineering research describes it: a client tool and its repositories that find, fetch, verify and install software and everything it depends on, from the published packages up to the developer's or administrator's purpose (reader's view)

  1. L1: The published packages: archives and metadata on registries, repositories and mirrors, published by maintainers
  2. L2: Discovery: root and package metadata fetched and cached; the request and the project's manifest read
  3. L3: Verification: hashes and signatures checked against trusted keys; freshness by expiration times
  4. L4: Dependency resolution: a consistent set of versions chosen from the universe
  5. L5: The plan and its policy: optimisation criteria, pins, holds, locks
  6. L6: Installation and record: scripts run, files placed, local database and lockfile written
  7. L7: Purpose: software reused without manual installs; a consistent, reproducible system or project

the boardroom (shared floors)

  1. L4: Dependency resolution: the solver combines installed status, the universe of packages, the request, the lock and preferences into a consistent choice of versions; NP-complete, by ad hoc search or SAT, PBO, MILP or answer-set solvers
  2. L5: The upgrade plan and its policy: a partially ordered list of download, install and remove actions, shaped by optimisation criteria, pins and holds, and by advisories
  3. L6: Installation: archives fetched and checked, install scripts run with the user's or superuser's rights, files placed, the local database or lockfile written; atomic and reversible only in the functional kind
  4. L7: Purpose: a consistent working system or project built from others' code without manual installs, reproducible across machines; for registries, reuse at ecosystem scale

way in: New releases published by maintainers

  1. L1: Maintainers' accounts and their code; anyone with an account can publish
  2. L2: Published to the registry with one command, with little to no review
  3. L3: Appears in metadata; any dependent whose range admits it receives it at its next resolution

way in: Repository metadata from the registry and its mirrors

  1. L1: Repositories and mirrors on HTTP or FTP servers, mirrors copying the main repository
  2. L2: Root metadata fetched first: the file holding secure hashes of the package metadata, signed in the strongest model, with an expiration time
  3. L3: Package metadata: names, versions, what each provides and depends on, checked against the root metadata's hashes

way in: The lockfile from the project's last resolution

  1. L1: The project's files under version control, where the lockfile is committed (99.7% of Go projects, 0.9% of Gradle projects)
  2. L2: The lockfile: resolved versions, checksums and sources for every direct and indirect dependency
  3. L3: Read at the start of a build; npm, pnpm, Poetry, Gradle and Go respect locked versions by default, Cargo and Pipenv resolve afresh

way in: The package archives themselves

  1. L1: Archives on the registry or mirrors: program files plus embedded metadata
  2. L2: Downloaded by the client; an unbounded download can fill disk or memory (endless-data attack)
  3. L3: Checked against the secure hash in the package metadata
  4. L4: Checked against the lockfile's checksum, where the lockfile records one (Gradle's does not)
  5. L5: The package's own signature, where the registry carries one (mandatory on Maven Central since 2005; PyPI's PGP deprecated in 2023)

way in: The request and the project's declared dependencies

  1. L1: A person's need for software: an administrator wanting a program, a developer wanting a library
  2. L2: A command (install, remove, upgrade) or a dependency specification file listing the project's direct dependencies with version constraints
  3. L3: Constraints read: version ranges, flex-patch or flex-minor modifiers, qualifiers, preferences such as -changed,-removed

way in: Trust anchors: the keys and signatures the client accepts

  1. L1: Maintainers' and distributions' signing keys; for PGP, public keys found on key servers
  2. L2: The keys the client trusts, set ahead of time; mirrors hold no signing key and only copy signed files
  3. L3: Signatures checked; in TUF, metadata accepted only with a threshold of signatures, a valid time and no rollback

way in: Vulnerability advisories about installed packages

  1. L1: Publicly known vulnerabilities in packages (up to 40% of npm packages depend on code with one)
  2. L2: Advisory databases read by the client (npm's audit feature, from 2018's npm 6)
  3. L3: Matched against the installed tree
  4. L4: Held back where a lockfile pins the vulnerable version until it is regenerated; fixes take months to propagate

way in: What is already installed (the local package database)

  1. L1: The host system as it is: files and programs already in place
  2. L2: The local package database written at each installation
  3. L3: Read as the current status, one of the solver's inputs

way out: Install: the plan carried out on the host

  1. L1: The host's files and programs changed
  2. L4: Install scripts run with the user's operating-system permissions
  3. L6: The plan's actions executed: download, install, remove

way out: Registry remediation: removal of packages and accounts; unpublishing rules

  1. L1: The registry's contents changed
  2. L3: Reported packages removed and publishers' accounts disabled
  3. L7: Registry policy: what may be published, unpublished, signed

way out: Report failure: an error when no plan is found

  1. L1: The person facing the error: dependency hell
  2. L4: Missing dependencies or conflicts: most managers stop with an error; Maven and Cargo install the latest instead

way out: Write the lockfile

  1. L1: Committed (or not) into the project's version control
  2. L5: The resolution recorded: versions, checksums, sources

Sources (27) published science

Package manager (Wikipedia, Wikimedia Enterprise snapshot; sections read: lead, history, functions, upgrade suppression, app stores)
Gamage Y, Tiwari D, Monperrus M, Baudry B (2026) The design space of lockfiles across package managers. Empirical Software Engineering, doi:10.1007/s10664-025-10789-w (OpenAlex stored full text; sections read: introduction, definitions, RQ1 lockfile content and lifecycle, RQ2 commit rates, findings) (behind its links)
npm (Wikipedia, Wikimedia Enterprise snapshot; sections read: lead, usage, registry, notable breakages and incidents) (behind its links)
Zimmermann, Staicu, Tenny, Pradel 2019. Small World with High Risks: A Study of Security Threats in the npm Ecosystem (USENIX Security 2019). arXiv:1902.09217 (behind its links)
Duan, Alrawi, Kasturi, Elder, Saltaformaggio, Lee 2021. Towards Measuring Supply Chain Attacks on Package Managers for Interpreted Languages. NDSS 2021, doi:10.14722/ndss.2021.23055 (sections: introduction, framework, findings) (behind its links)
Cappos, Samuel, Baker, Hartman 2008. A look in the mirror: attacks on package managers. ACM CCS 2008, doi:10.1145/1455770.1455841 (open copy from the University of Arizona read: abstract, sections 2-4, 8 on mirror traces and compromised clients, 9) (behind its links)
Abate P, Di Cosmo R, Gousios G, Zacchiroli S (2020) Dependency Solving Is Still Hard, but We Are Getting Better at It. SANER 2020, doi:10.1109/SANER48275.2020.9054837; arXiv:2011.07851 (read in full) (behind its links)
Ohm M, Plate H, Sykosch A, Meier M. Backstabber's knife collection: a review of open source software supply chain attacks. arXiv:2005.09535 (DIMVA 2020) (behind its links)
Samuel, Mathewson, Cappos, Dingledine 2010. Survivable key compromise in software update systems. ACM CCS 2010, doi:10.1145/1866307.1866315 (open copy from theupdateframework.io read: sections 1-8, the design, the key-compromise analysis and the PyPI integration) (behind its links)
Decan, Mens & Grosjean 2019, An empirical comparison of dependency network evolution in seven software packaging ecosystems, Empirical Software Engineering (arXiv:1710.04936) (behind its links)
Dolstra E, de Jonge M, Visser E (2004) Nix: A Safe and Policy-Free System for Software Deployment. LISA 2004 (Utrecht University repository copy; sections read: abstract, motivation, the Nix store) (behind its links)
Decan A, Mens T, Constantinou E (2018) On the evolution of technical lag in the npm package dependency network. ICSME 2018; arXiv:1806.01545 (sections read: abstract, definitions, RQ1-RQ2 findings) (behind its links)
Zahan N, Zimmermann T, Godefroid P, Murphy B, Maddila C, Williams L (2022) What are Weak Links in the npm Supply Chain? ICSE-SEIP 2022; arXiv:2112.10165 (abstract read) (behind its links)
Taylor M, Vaidya RK, Davidson D, De Carli L, Rastogi V (2020) SpellBound: Defending Against Package Typosquatting. arXiv:2003.03471 (sections read: abstract, introduction with the loadsh case, background on npm and PyPI) (behind its links)
Ochoa L, Degueule T, Falleri J-R, Vinju J (2021) Breaking Bad? Semantic Versioning and Impact of Breaking Changes in Maven Central. Empirical Software Engineering; arXiv:2110.07889 (sections read: abstract, introduction and key findings) (behind its links)
Kula RG, Ouni A, German DM, Inoue K (2017) On the Impact of Micro-Packages: An Empirical Study of the npm JavaScript Ecosystem. arXiv:1709.04638 (sections read: abstract, introduction, RQ1 results on package size) (behind its links)
Lamb & Zacchiroli 2021, Reproducible Builds: Increasing the Integrity of Software Supply Chains, IEEE Software (arXiv:2104.06020) (behind its links)
Schorlemmer et al. 2024. Signing in Four Public Software Package Registries: Quantity, Quality, and Influencing Factors (IEEE S&P 2024). arXiv:2401.14635 (behind its links)
Malka J, Zacchiroli S, Zimmermann T (2025) Does Functional Package Management Enable Reproducible Builds at Scale? Yes. MSR 2025; arXiv:2501.15919 (sections read: abstract, introduction with contributions) (behind its links)
Przymus, Durieux 2025. Wolves in the Repository: A Software Engineering Analysis of the XZ Utils Supply Chain Attack. arXiv:2504.17473 (behind its links)
He R, He H, Zhang Y, Zhou M (2023) Automating Dependency Updates in Practice: An Exploratory Study on GitHub Dependabot. IEEE TSE, doi:10.1109/tse.2023.3278129 (OpenAlex stored full text; sections read: abstract, introduction, related work, data, RQ1 technical lag, RQ2 findings) (behind its links)
Ladisa, Plate, Martinez, Barais 2023. Taxonomy of Attacks on Open-Source Software Supply Chains. IEEE S&P 2023, doi:10.1109/SP46215.2023.00010, arXiv:2204.04008 (sections: introduction, taxonomy of malicious package names) (behind its links)
Courtes L (2013) Functional Package Management with Guix. European Lisp Symposium 2013; arXiv:1305.4584 (sections read: abstract, introduction, background on functional package management) (behind its links)
Dependency hell (Wikipedia, Wikimedia Enterprise snapshot; sections read: lead, problems, solutions) (behind its links)
Rahman I, Marley J, Enck W, Williams L (2025) Which Is Better For Reducing Outdated and Vulnerable Dependencies: Pinning or Floating? ASE 2025, doi:10.1109/ase63991.2025.00229 (OpenAlex stored full text; sections read: abstract, introduction, definitions of constraint types) (behind its links)
Bos AM (2023) A Review of Attacks Against Language-Based Package Managers. arXiv:2302.08959 (sections read: introduction, package manipulation and resolution attacks, denial of service) (behind its links)
Pinckney D, Cassano F, Guha A, Bell J (2023) Flexible and Optimal Dependency Management via Max-SMT. ICSE 2023, doi:10.1109/icse48619.2023.00124 (OpenAlex stored full text; sections read: abstract, introduction, background on NPM's duplicates, npm audit and peer dependencies, related work on complexity, evaluation of duplicates) (behind its links)