WindowsLinuxmacOS

Where Does pnpm Store Packages?

Where pnpm keeps its content addressable store on each OS, and the command that prints your live path.

Last updated

pnpm keeps one global content store and hard links packages into each project, which is why installs are fast and disk use stays low. The default store is ~/.local/share/pnpm/store on Linux, ~/Library/pnpm/store on macOS and %LOCALAPPDATA%\pnpm\store on Windows.

Never trust the default blindly. Run pnpm store path inside your project: it prints the store actually in use, which can differ per drive or when store-dir is set in config. Move or delete the store and pnpm simply refetches on the next install.

Where pnpm stores this, by platform

Windows
%LOCALAPPDATA%\pnpm\store

Run pnpm store path to confirm, since per drive stores and a store-dir setting override this. Change it with pnpm config set store-dir <path>. Prune unreferenced packages with pnpm store prune.

Linux
~/.local/share/pnpm/store

The global default when $PNPM_HOME and $XDG_DATA_HOME are unset. If either variable is set, the store moves under it instead, so echo both variables when the folder seems missing.

macOS
~/Library/pnpm/store

Same pnpm store path command applies. Deleting the folder is safe: the next pnpm install rebuilds whatever projects still need.

Frequently asked questions

Why is my pnpm store not where the docs say?

Run pnpm store path in the project directory. The store must live on the same disk as the install so packages link instead of copying, so pnpm creates one store per drive. The global default is only used when linking allows it.

How do I reclaim disk space from the pnpm store?

Run pnpm store prune. It removes packages no longer referenced by any project on the system. The store only ever grows otherwise, since uninstalling a project leaves its packages behind.

Notice an outdated path? Let us know.