Join the waitlistJoin
← All cleanup guides
pnpm

pnpm store: is it safe to delete?

The shared store of pnpm, from which every project links its installed packages.

Where it lives
  • ~/Library/pnpm/store
Risk
Low risk. The tool rebuilds it when needed, so SPACE256 preselects it in Review.
Comes back on its own
Yes
If you delete it
pnpm removes only the packages that no project links to any more, and downloads them again if a later install needs them.
What SPACE256 does
Runs the tool's own cleanup command, only after the tool reports this exact folder, after you confirm in Review with a press and hold.

Cleaned with the tool's own commandpnpm store prune

What it is

pnpm keeps one shared, content-addressed store of packages, here ~/Library/pnpm/store, and links each project’s node_modules to it. A package version is stored once, however many projects use it. pnpm store path prints where the store is on your Mac.

Why it grows

When projects upgrade or remove dependencies, the old versions stay in the store until something prunes it. Deleted projects leave all their packages behind.

When to clear it

Whenever you like: pruning only removes what nothing links to.

When to keep it

There is little reason to keep unreferenced packages, unless you are about to reinstall an old project offline.

How SPACE256 clears it

SPACE256 runs pnpm’s own pnpm store prune, after pnpm reports this exact folder as its store, so pnpm decides which packages are unused.

Questions

Does `pnpm store prune` remove packages my projects use?

No. It removes only packages that no project links to any more. Packages your projects use stay in the store.

Why not just delete the store folder?

Every project installed with pnpm links its node_modules to the store. Deleting it would break those projects until each one is installed again; pruning avoids that.

Get SPACE256 at launch