Safe to Delete

pnpm Global Store Folder (~/.local/share/pnpm/store)

Quick Answer: The pnpm global content-addressable store caches hard-linked packages. Pruning unreferenced packages via pnpm store prune is safe and frees storage.

Bottom Line: You can safely prune the pnpm store using pnpm store prune. This removes old, unreferenced package files that are no longer linked to any active JavaScript project on your computer.


What is the pnpm Store Folder?

Located at ~/.local/share/pnpm/store on Linux, ~/Library/pnpm/store on macOS, or %LocalAppData%\pnpm\store on Windows, the pnpm store is a global content-addressable storage directory used by pnpm.

Unlike npm which copies dependencies into every node_modules folder, pnpm saves a single hard-linked copy of each package inside its global store. However, when you delete JavaScript projects or upgrade dependencies, old package versions remain in the global store indefinitely, occupying 5 GB to 20 GB+.


Can You Delete / Prune the pnpm Store?

  • Pruning via pnpm store prune:100% safe. It scans all projects on your system and only deletes packages that are no longer used by any active project.
  • Manually deleting the entire store folder: ⚠️ Use Caution. If active projects rely on hard links in the store, wiping the store manually will break those active projects until you run pnpm install again.

How to Safely Clean Up pnpm Store

Run this single command in terminal:

pnpm store prune

What it does: It checks every package file in the global store. If no project links to that package version anymore, pnpm deletes it, instantly reclaiming space.

Method 2: Force Re-build Store Path

To check store status and disk usage:

pnpm store status

Discussion

Loading authentication...

Related in developer

The AI Engineer's Model Disk Cleanup Guide: Hugging Face, Ollama & PyTorch

The ultimate 1,200-word field guide for AI developers and local LLM hobbyists to reclaim 200GB+ from Ollama, Hugging Face, PyTorch, and vLLM model weights.

Safe to Delete

Android Studio System Index Cache (AndroidStudio Cache)

Android Studio caches Gradle project indexes, VFS caches, and compiler artifacts. Invalidate and clear is safe.

Safe to Delete

Ansible Automation Temp & Fact Cache (~/.ansible/tmp)

Ansible stores temporary playbook execution modules and target host fact JSON caches in ~/.ansible/tmp. Clearing Ansible tmp is safe.

Safe to Delete
Back to all files