pnpm store prune and store path
The pnpm store holds every package version once, shared across projects.
Caching the store is the single biggest pnpm CI speedup. store prune reclaims space by removing unreferenced packages.
Common usage
pnpm store path- print the store dir (cache this)pnpm store prune- remove unreferenced packagespnpm store status- check integrity
Example in CI
Expose the store path for the cache step.
shell
pnpm store pathIn CI
Cache the directory from pnpm store path keyed on pnpm-lock.yaml. Managed runners like Latchkey keep this store warm across jobs.
Key takeaways
- Cache the dir from
pnpm store path. store prunereclaims space.- Key the cache on the lockfile.