pnpm store taking up space on Mac: safe to delete?
Where it is
~/Library/pnpm/store~/.local/share/pnpm/store~/.pnpm-store
What it is
pnpm downloads each package version once into a global content-addressable store, then hard-links the files into each project's node_modules. On macOS the store usually sits in ~/Library/pnpm/store, while older or customized setups use ~/.local/share/pnpm or ~/.pnpm-store.
Why it gets so big
The store collects every package version any project has used, and it isn't pruned automatically when projects upgrade dependencies or get deleted.
Is it safe to delete?
With care, which is why it's flagged for review. Because pnpm projects' node_modules share the same data as the store, deleting it frees less than its size suggests while those projects still exist, and pnpm will need to rebuild the store: run pnpm install in your active projects afterwards. pnpm's own prune command is the gentler option, since it only removes packages that no project references.
Tip
Pruning is the better first move. Save a full delete for when the store is corrupted or you've stopped using pnpm altogether.
See how much space it uses
du -sh "$HOME/Library/pnpm/store" "$HOME/.local/share/pnpm/store" "$HOME/.pnpm-store" 2>/dev/nullClean it with the tool’s own command
pnpm store pruneDelete it by hand
Run in Terminal. Deleting cannot be undone, so check the paths first.
rm -rf "$HOME/Library/pnpm/store"
rm -rf "$HOME/.local/share/pnpm/store"
rm -rf "$HOME/.pnpm-store"