# pnpm

> A tool that adds packages to JavaScript apps. It keeps one copy of each on your disk.

**Field:** Software Development  
**Category:** Editors & Tools  
**Also known as:** pnpm add, pnpm package manager

## Think of it like

It is like one shared toy box for the whole street. Nobody keeps a second copy at home.

## Definition

pnpm is a free package manager for JavaScript that saves disk space. It keeps each version of a package only once, in one store on your computer. Each project then links to the files in that store. It does not copy them. So ten projects that use the same package share one copy. It installs from the same npm registry as npm and Yarn.

## Example

Jack has 20 small projects that all use React. With pnpm, React sits on his disk once, and every project points to it.

## Example code

```console
$ pnpm add react
```

Adding a package links it from the shared store into the project.

## Why it matters

Big projects pull in thousands of packages. Sharing one copy saves gigabytes and makes installs quicker.

## Common mistake

Expecting a package to be found when you never added it. pnpm is strict and only lets code use what it listed.

## Three principles

- **One store.** Each version is kept once per computer.
- **Links, not copies.** Projects point to the shared files.
- **Strict.** Code only gets what it listed.

## Related terms

- [Package Manager](https://learn.benibix.com/term/development/package-manager)
- [npm](https://learn.benibix.com/term/development/npm)
- [Yarn](https://learn.benibix.com/term/development/yarn)
- [Lockfile](https://learn.benibix.com/term/development/lockfile)
- [Monorepo](https://learn.benibix.com/term/development/monorepo)

## Told apart from

- [npm vs pnpm](https://learn.benibix.com/compare/npm-vs-pnpm): People think pnpm is just a faster npm, and there is more to it. npm puts a full copy of each package in every project. pnpm keeps one copy of each version on the disk and links each project to it. pnpm is also strict, so code may only use the packages it listed.

## Taught in

- [Yarn, pnpm, Cargo and Homebrew](https://learn.benibix.com/learn/development-tools/yarn-pnpm-cargo-and-homebrew): Coding Tools, 9/13

![A table of four rows. JavaScript: npm, Yarn and pnpm, all fetching from the npm registry. Python: pip and uv, fetching from PyPI. Rust: Cargo, fetching from crates.io. Apps on Mac and Linux: Homebrew, fetching from its own list, called formulae. Each row runs from the language on the left, through its tools, to its registry on the right.](https://learn.benibix.com/diagrams/dev5-package-managers.svg)

---

Source: https://learn.benibix.com/term/development/pnpm
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
