Suggest an editImprove this articleRefine the answer for “How does pnpm save disk space?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**pnpm** saves disk space through a **centralized cache and hard links**, instead of copying the same packages into every project. **Key point:** in `node_modules`, pnpm does not copy files, it creates hard links to the cache, so only one physical copy of each dependency exists on disk.Shown above the full answer for quick recall.Answer (EN)Imagepnpm saves disk space through a **centralized cache and hard links**, instead of copying the same packages into every project. --- ### The saving mechanism 1. **A single package store** - pnpm stores downloaded dependencies **in one global cache** (usually in `~/.pnpm-store`). - If another project needs the same package version, pnpm **does not download it again**. 2. **Hard links instead of copies** - In `node_modules`, pnpm **does not copy files**, it creates **hard links** to the cache. - As a result, the disk effectively holds **one copy** of each dependency, even if it is used across dozens of projects. --- ### The difference from npm/Yarn | Manager | Where packages live | Result | |---|---|---| | npm / Yarn | a package copy in every project | gigabytes of duplicates | | **pnpm** | 1 copy in the cache + links | minimal disk space | --- ### The practical effect - the same React, lodash, moment, and so on **are not stored hundreds of times**; - the savings can add up to dozens of gigabytes across many projects; - installation gets faster because there are no repeat downloads or copies. --- ### Conclusion pnpm saves space through a **global cache** and **hard links in** `node_modules`, which eliminates dependency duplication and sharply cuts the disk space packages take up.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.