---
id: mac-storage-basics.how-do-i-clean-npm-yarn-and-pip-caches
url: https://storagestudio.us/faq/mac-storage-basics/how-do-i-clean-npm-yarn-and-pip-caches
category: "Mac storage basics"
subcategory: "Developer tools"
question: "How do I clear npm, Yarn and pip caches on a Mac?"
alt_questions:
  - "npm cache clean mac"
  - "pip cache purge"
  - "yarn cache clean"
  - "package manager cache taking space"
  - "node cache mac storage"
short_answer: "Run npm cache clean --force, yarn cache clean, pnpm store prune or pip cache purge. They only slow the next install while packages re-download."
tags: ["npm", "pip", "yarn", "developer"]
related: ["https://storagestudio.us/faq/mac-storage-basics/how-do-i-clean-up-node-modules-folders", "https://storagestudio.us/faq/mac-storage-basics/how-do-i-clean-up-homebrew"]
applies_to: "all"
last_reviewed: 2026-10-01
---

# How do I clear npm, Yarn and pip caches on a Mac?

Each package manager has its own command:

- **npm**: `npm cache clean --force`
- **Yarn**: `yarn cache clean`
- **pnpm**: `pnpm store prune`
- **pip**: `pip cache purge`

These caches only speed up future installs; clearing them means the next install downloads packages again. Your projects aren't affected.

Storage Studio's Free Up Space includes a developer and package caches step that clears caches like these with a review first. See [freeing up space](https://storagestudio.us/faq/freeing-space/).
