Macaroom
Guides › ~/.npm and ~/.cache

Is it safe to delete ~/.npm and ~/.cache on Mac?

These two hidden folders hold download caches for developer tools, and they get big: 23 GB and 34 GB on our Mac. Almost everything in them downloads again when it's needed.

The short answer

Yes, for caches. Tools download what they need again, so the cost is a slower next install and a network connection. Use each tool's own clean command when it has one. The one thing to think twice about is large AI models in ~/.cache, which can take a long time to download again.

Neither folder holds your projects' node_modules. Clearing them doesn't touch any project.

~/.npm

FolderWhat it isHow to clear
~/.npm/_cacachenpm's download cache (20 GB on our Mac)npm cache clean --force
~/.npm/_npxPackages npx downloaded to run a command (2.8 GB)Delete the folder. npx downloads again when needed
~/.npm/_logsnpm's logsSafe to delete

~/.cache

Each tool gets its own folder here, so look before you delete:

du -sh ~/.cache/* | sort -h

FolderWhat it isHow to clear
huggingfaceAI models and datasets from Hugging Face (22 GB on our Mac)Delete the models you don't use. More on AI models
uvuv, the Python package manager (7 GB)uv cache clean, or uv cache prune to keep what's in use
puppeteerBrowsers downloaded by Puppeteer (551 MB)Delete. It's downloaded again when a project installs Puppeteer

Other package caches on a Mac

ToolWhereHow to clear
Yarn~/Library/Caches/Yarnyarn cache clean
pnpm~/Library/pnpm/storepnpm store prune
pip~/Library/Caches/pippip cache purge
Homebrew~/Library/Caches/Homebrewbrew cleanup
Bun~/.bun/install/cachebun pm cache rm
CocoaPods~/Library/Caches/CocoaPodspod cache clean --all
Gradle~/.gradle/cachesStop Gradle, then delete the folder
Maven~/.m2/repositoryDelete. Packages download again
Cargo~/.cargo/registryDelete. Crates download again

How Macaroom handles it

Macaroom lists these under Developer caches, marked Rebuildable: ~/.npm as one item, and each tool in ~/.cache on its own. Hugging Face models appear under AI models, one model at a time. Anything you clear goes to the Trash first, so you can put it back.

Related guides

See it on your own Mac

Macaroom scans your Mac, names what each chunk of storage is, and marks what's safe to clear. Anything you remove goes to the Trash, so you can put it back.

Get Macaroom