← all systems · see it in The System
Package manager
| boundary | Inside: 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 level | An 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. |
| scale | technological |
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 at | dpkg by 1994; repository downloads with dependency resolution from about 1995 beginning with CPAN; an AIX tool in 1989 given without citation |
| born precision | year |
Measures (36) published science
| characteristic clock: technical lag of npm releases | 7 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 report | 209 days on average (median 67, max 1,216; 174 packages, 2015-2019) |
| left-pad time to republish | 3 hours |
| implicitly trusted packages and maintainers per npm install | 79 packages, 39 maintainers average per installed package (2018) |
| reach of the top-5 npm packages | 134,774 to 166,086 packages each (2018) |
| average npm package reach | about 230 other packages (2018) |
| event-stream reach | 5,466 packages (1 April 2018); 1,165 packages had greater or equal reach |
| event-stream use at takeover | 1,600 packages; 1.5 million dependent packages; downloads a week |
| maintainers whose vetting would halve the risk of compromised accounts | about 140 of more than 150,000 maintainers |
| npm packages depending on publicly known vulnerable code | up to 40 % |
| median transitive dependencies of a dependent package | 41 (Cargo), 21 (npm), 27 (NuGet) packages, against a median of 2 direct |
| share of required packages holding over 80% of reverse dependencies | 6 (npm, RubyGems) to 17 (NuGet) % |
| Cargo 5-Impact Index | 99 packages each transitively required by at least 5% of Cargo (January 2017; over 1.3% of its 7,421 packages) |
| seven ecosystems' size | 830k packages, 5,812k releases, 20,509k dependency relations on 1 April 2017 (Cargo, CPAN, CRAN, npm, NuGet, Packagist, RubyGems) |
| malicious packages that run at install | 56 % (of 174) |
| malicious packages injected by typosquatting | 61 %; average edit distance to the target 2.3 |
| previously unknown malicious packages found and confirmed | 339 found, 278 confirmed packages (82%) |
| npm packages hijackable through expired maintainer domains | 8,494 packages via 2,818 maintainer addresses (1.63 million packages studied) |
| typosquatting check warnings and overhead | 0.5% of installs; 2.5% of install time warnings; overhead |
| signing overhead of layered metadata signatures | 2-5 % (Stork) |
| official mirrors obtained with false credentials | 5 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 versioning | 83.4 % of 119,879 upgrades; 20.1% of non-major releases breaking |
| share of npm libraries that are micro-packages | up to 47 % |
| lockfile commit rate | 99.7 (Go), 0.9 (Gradle) % of projects committing the lockfile |
| Debian packages buildable reproducibly | over 95 % of 30,000+ packages (2021) |
| share of Maven signing failures that were public-key failures (2023) | over 99 % |
| package managers listed by libraries.io | more than 30 package managers |
| npm registry size | over 3.1 million packages |
| left-pad downloads before removal | 15 million downloads |
| maintainers who together reach more than half of npm | 20 maintainers (collusion scenario, 2018) |
| maintainers affecting more than 10,000 npm packages | 391 maintainers (2018; 59 in 2015) |
| nixpkgs bitwise reproducibility | 69 to 91 % of 709,816 package builds, 2017-2023, rising; rebuildability over 99%; about 15% of failures from embedded build dates |
| XZ Utils attack span | 2.6 years (2021-10-29 to 2024-03-28) |
| technical lag before and after an update bot | 48.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 taxonomy | 107 / 94 / 33 vectors / real-world incidents / safeguards |
Open contentions (4) open contention
Where sources or readings disagree. Both stay on the map.
- C-4655 Are tiny reusable software packages a strength, being easy to read and reuse, or a weakness that makes software fragile and easier to attack?
booked: The map keeps both readings side by side and rules on neither.
the other reading: small reusable packages are a strength of the ecosystem (readability and comprehension; src:kula-2017-micropackages); trivial packages increase the attack surface and fragility (left-pad; src:zimmermann-2019-npm; src:decan-2019-dependency) - C-4656 Should software projects lock their building blocks to exact versions for safety, or allow automatic newer versions so they pick up security fixes sooner?
booked: The map keeps both readings side by side and rules on neither.
the other reading: pin dependencies (security practitioners, as reported in src:rahman-2025-pinning); float with lockfiles: floating-major least likely to be outdated, floating-minor least likely to be vulnerable (src:rahman-2025-pinning); lockfiles themselves delay fixes until regenerated (src:zimmermann-2019-npm) - C-4657 Should software package stores require authors to digitally sign their packages, drop signing that few use well, or sign the store's own listings instead?
booked: The map keeps both readings side by side and rules on neither.
the other reading: mandate maintainer signatures in the registry (Maven Central's policy; src:schorlemmer-2024-signing); drop PGP signing where few use it and its quality is poor (PyPI's decision; src:schorlemmer-2024-signing); sign the repository's metadata rather than each package, so untrusted mirrors can serve trusted content (src:cappos-2008-mirror; src:samuel-2010-tuf); who signs: the maintainer (Maven) or the registry on the maintainer's behalf (npm); maintainer signing is harder to manage, registry signing gives weaker guarantees (src:schorlemmer-2024-signing) - C-4658 Should the puzzle of picking compatible software versions be handed to one shared, general-purpose solver, or should each software installer keep its own?
booked: The map keeps both readings side by side and rules on neither.
the other reading: dependency solving should be delegated to generic, complete solvers built once and plugged into every package manager (Abate et al.'s 2012 proposal, reviewed in src:abate-2020-dependency-solving); each community keeps its package manager's solver in its own hands and language, accepting ad hoc solvers (the practice the census records, and the social reasons the authors give); pluggable optimisation objectives rather than only pluggable solvers: Max-SMT with user-chosen objectives such as min_cve and min_duplicates (src:pinckney-2023-maxnpm)
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.
- red-queen (structural)
Mirror attacks against package-manager security, in turns: package signatures were beaten by replaying older signed packages; signed root metadata with hashes answered replay; freeze attacks remained, answered by expiration times; single-key compromise was answered by roles and thresholds (TUF). The - same role, different builds (structural)
One job, choosing a consistent set of versions, done by ad hoc graph search keeping both versions side by side (npm; src:pinckney-2023-maxnpm), nearest-wins (Maven, NuGet), SAT solvers (libsolv, Sat4j), external CUDF solvers (opam), name mangling so two versions co-exist (Cargo), or by giving every - templating (structural)
One package reused unchanged by thousands of projects: left-pad, a few lines, sat inside Atom and Babel; top npm packages reach over 130,000 others. - trade one property for another (structural)
Version constraints trade determinism for freshness: pinning buys a deterministic build and pays in missed fixes; floating buys fixes and pays in breaking changes; projects settle along the dial (pin, floating-patch, floating-minor, floating-major). Security practitioners pull one way, the measured - who opens the door (structural)
The receiving machine opens its own door ahead of time: it holds the keys it will accept, asks the repository, and runs each package's install script with the user's (often root's) rights. Attackers come in through that door: 56% of malicious packages start at install. - barrier-gates-complexity (partial)
Separate namespaces (functional package managers, virtual environments) let packages that would be incompatible in a shared namespace sit side by side; without the separation, forbidding co-installation of two versions makes solving NP-complete. The without-the-barrier case is shown; whether this is - borrowed-then-held (partial)
Dependency resolution first done by the person (packages from about 1994 had no automatic resolution), then held by the tool (from about 1995, beginning with CPAN). - holding / entrainment (partial)
The registry sets when its parts may die: after left-pad npm decides whether a package may be unpublished, and removes malicious ones itself. - lightning (partial)
left-pad: one small removal set off a cascade of failures across thousands of dependents, after which the registry's rules and the ecosystem's dependency structure were not the same. A removal rather than a stored difference discharging. - namespace completeness (the map predicts its gaps) (partial)
The namespace predicts where attacks will land: unclaimed names a small edit away from popular ones (typosquats average 2.3 edits from their target) and private names unclaimed on the public registry (dependency confusion). SpellBound computes those neighbours before install. - nested ladder (partial)
Security models in increasing order: no signatures, package signatures, signatures on detached package metadata, signatures on the root metadata; the order held as other weaknesses were fixed. A half-rung split: root-metadata signatures cannot verify a stand-alone package, which package signatures c - outside-to-inside (partial)
Build inputs that conventional builds take from the surrounding system become part of the package's identity: Nix hashes all build inputs into the store path; reproducible builds fix timestamps with SOURCE_DATE_EPOCH. Tempered: declaring the inputs does not bring every input inside; nixpkgs reaches - same shape, opposite sign (partial)
One act, a package's removal from the registry, with opposite effects: by its author (left-pad) it broke thousands of dependents; by the registry (malicious packages) it protects them. - same toolkit, independent builds (partial)
Seven package managers each built lockfiles from the same parts (resolved versions, checksums, sources) with different lifecycles and enforcement. Whether they were built independently or copied is not shown. - seed (partial)
A few lines of a manifest unpack into a tree of dozens of packages (79 on average in npm), and the arrival of automatic resolution let ecosystems grow exponentially in packages and dependencies. Expansion more than new combinatorics. - The carry (partial)
A fix waits at each hand-off: the patched version is not installed until the lockfile is regenerated, and through a chain of dependents each maintainer must update in turn; average technical lag 7 to 9 months. npm's figure; update bots shorten the wait (src:he-2023-dependabot). - The Payment to Entropy (partial)
Each hand-off from a release to its dependents loses freshness: 25% of npm releases lag more than 9 months; up to 40% of packages depend on vulnerable code. A signal-form toll; not given per hop in the sources read. - the whole sets the local reference (partial)
Without a lockfile each install resolves against the registry as it is that moment, so two machines or two times get different versions: each local install reads true, the readings do not close into one. The lockfile makes the project the reference. - Umwelt: each system carves its own slice of one shared medium (partial)
Each package manager carves its own slice of the same code: semantic versions (npm, Cargo), Debian versions (apt, opam), git tags (Go), free strings (CPAN); what a range means differs by manager. - causal ceiling (surface)
Because the finest unit is the package, developers cannot know whether a vulnerability in a dependency affects their program; the limit is set by the system's granularity, not by effort. Not causal structure in the physical sense. - partner-becomes-part (surface)
Vendoring: a dependency's code committed into the project, loaded from the vendor folder instead of the registry. The reverse also seen: functionality split out into micro-packages (up to 47% of npm).
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.
- Human (Homo sapiens) via Human (Homo sapiens) · Package manager gain
- Internet via Internet · Package manager gain
- Operating system via Computer hardware · Package manager gain
- Programming language via Written record (durable external marks: texts, archives, canon) · Package manager gain
- Open-source software via Written record (durable external marks: texts, archives, canon) · Package manager gain
- Threat actor via Internet · Package manager loss
- Supply chain security via Supply chain security · Package manager gain
- Version control via Version control · Package manager gain
- Supply chain attack via Software supply-chain security · Package manager loss
- Software update channel via Internet · Package manager gain
Partners and parts published science
Built from / builds (7)
- Package registries and their policies
- Mirrors and content delivery networks
- Signing keys and roles
- Dependency solver
- Local package database
- Lockfile
- Package-manager security against attackers who can answer clients' requests
Sits inside / holds (3)
expressed by (27)
- Generation/Synthesis
- Recombination/Composition
- Scaffolding/Enablement (Meta-Tooling)
- Templating / Standardization
- Encapsulation & Modularity (Abstraction)
- Amplification/Scale-Up (Manufacture & Distribution)
- Distributed Autonomy/Decentralized Execution (Subsidiarity)
- Internal Coordination/Regulation
- Sensing/Scanning
- Search/Foraging
- Mapping/Modeling
- Navigation/Pathfinding
- Trail-Marking / Externalized Memory (Stigmergy)
- Subversion & Co-optation
- Reactive Response
- Proactive Defense
- Physical/Virtual Barrier
- Technique-Based Identification (a.k.a. Technique-Based Detection)
- Self-Monitoring
- Validation of Identity/Intention
- Validation of Effectiveness
- Enclave/Segregation
- Deception
- Resilience & Repair
- Redundancy & Diversity
- Quality Control & Error Correction
- Bridging Supply Gaps (Store & Dormancy)
floor filled by (14)
- Supply chain security
- Human (Homo sapiens)
- Internet
- Operating system
- Cryptographic hash function
- Open-source software
- Package registries and their policies
- SAT solver
- Mirrors and content delivery networks
- Signing keys and roles
- Dependency solver
- Local package database
- Lockfile
- Package manager client
Kinds (5)
- Software update channel
- Operating-system package manager (dpkg and APT, RPM with YUM or DNF, Pacman, Portage, ports)
- Language package manager (CPAN, PyPI with pip, npm, Maven, Cargo, RubyGems, NuGet, Packagist, CRAN)
- Functional package manager (Nix, Guix)
- App store
wired (2)
Notes published science
- 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).
- Installing an average npm package means implicitly trusting 79 other packages and 39 maintainers, and just 20 maintainers can reach more than half of the npm ecosystem (src:zimmermann-2019-npm).
- Choosing which versions of software to install is NP-complete when versions of the same package are mutually incompatible or packages declare conflicts, and during 2005-2015 most package managers could fail to find a valid plan that existed; npm sidesteps the problem by installing several versions of the same package side by side and disregarding conflicts (src:abate-2020-dependency-solving; src:pinckney-2023-maxnpm).
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)
- L1: The published packages: archives and metadata on registries, repositories and mirrors, published by maintainers
- L2: Discovery: root and package metadata fetched and cached; the request and the project's manifest read
- L3: Verification: hashes and signatures checked against trusted keys; freshness by expiration times
- L4: Dependency resolution: a consistent set of versions chosen from the universe
- L5: The plan and its policy: optimisation criteria, pins, holds, locks
- L6: Installation and record: scripts run, files placed, local database and lockfile written
- L7: Purpose: software reused without manual installs; a consistent, reproducible system or project
the boardroom (shared floors)
- 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
- 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
- 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
- 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
- L1: Maintainers' accounts and their code; anyone with an account can publish
- L2: Published to the registry with one command, with little to no review
- 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
- L1: Repositories and mirrors on HTTP or FTP servers, mirrors copying the main repository
- L2: Root metadata fetched first: the file holding secure hashes of the package metadata, signed in the strongest model, with an expiration time
- 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
- L1: The project's files under version control, where the lockfile is committed (99.7% of Go projects, 0.9% of Gradle projects)
- L2: The lockfile: resolved versions, checksums and sources for every direct and indirect dependency
- 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
- L1: Archives on the registry or mirrors: program files plus embedded metadata
- L2: Downloaded by the client; an unbounded download can fill disk or memory (endless-data attack)
- L3: Checked against the secure hash in the package metadata
- L4: Checked against the lockfile's checksum, where the lockfile records one (Gradle's does not)
- 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
- L1: A person's need for software: an administrator wanting a program, a developer wanting a library
- L2: A command (install, remove, upgrade) or a dependency specification file listing the project's direct dependencies with version constraints
- 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
- L1: Maintainers' and distributions' signing keys; for PGP, public keys found on key servers
- L2: The keys the client trusts, set ahead of time; mirrors hold no signing key and only copy signed files
- 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
- L1: Publicly known vulnerabilities in packages (up to 40% of npm packages depend on code with one)
- L2: Advisory databases read by the client (npm's audit feature, from 2018's npm 6)
- L3: Matched against the installed tree
- 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)
- L1: The host system as it is: files and programs already in place
- L2: The local package database written at each installation
- L3: Read as the current status, one of the solver's inputs
way out: Install: the plan carried out on the host
- L1: The host's files and programs changed
- L4: Install scripts run with the user's operating-system permissions
- L6: The plan's actions executed: download, install, remove
way out: Registry remediation: removal of packages and accounts; unpublishing rules
- L1: The registry's contents changed
- L3: Reported packages removed and publishers' accounts disabled
- L7: Registry policy: what may be published, unpublished, signed
way out: Report failure: an error when no plan is found
- L1: The person facing the error: dependency hell
- L4: Missing dependencies or conflicts: most managers stop with an error; Maven and Cargo install the latest instead
way out: Write the lockfile
- L1: Committed (or not) into the project's version control
- L5: The resolution recorded: versions, checksums, sources