pnpm Config and Store/Prune unreferenced packages from store

Delete unreferenced packages from the global store.

Section: Store and Cache

Prune unreferenced packages from store

bash
bash
pnpm store prune
Explanation

Delete unreferenced packages from the global store.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Store and Cache
Show store path
Display the content-addressable store location.
OpenIn sheetbashsame section
Show modified packages in store
Check whether packages in the store were modified.
OpenIn sheetbashsame section
Show package metadata cache path
Print the path of pnpm's metadata cache.
OpenIn sheetbashsame section
Delete package metadata cache entries
Clear package metadata cache entries.
OpenIn sheetbashsame section
Set config value
Set a pnpm configuration value.
OpenIn sheetbash2 tag match
Configure store directory
Pin the store location explicitly.
OpenIn sheetbash2 tag match