How to clear pip cache on Mac, with pip itself.
pip keeps the packages it downloads and the wheels it builds, so installing them again is fast. On a Mac that cache lives in your Library folder, and pip has its own command to empty it.
The short version
Run pip cache purge. It empties pip's cache, which on a Mac is ~/Library/Caches/pip. Installed packages and your virtual environments aren't touched; pip downloads what it needs again on the next install. With more than one Python, run python3 -m pip cache purge so you clear the cache of the pip you actually use.
Where pip keeps its cache on a Mac
pip follows the Mac convention and keeps its cache in ~/Library/Caches/pip, not in the ~/.cache folder it uses on Linux. Ask pip directly:
pip cache dir
pip cache info
| What | Default location | On one Mac |
|---|---|---|
| Downloaded packages and index pages | ~/Library/Caches/pip/http-v2 | 612 MB in 1,502 files |
| Wheels pip built from source | ~/Library/Caches/pip/wheels | 19 MB, 4 wheels |
Sizes are from pip cache info on one developer Mac in October 2026. pip 23.3 and later use http-v2; older versions used http, and both can be there if you've upgraded. If you set PIP_CACHE_DIR or XDG_CACHE_HOME, the cache moves with it.
Is it safe to clear pip cache?
Yes. The cache is only a shortcut. It holds package files pip downloaded and wheels it compiled from source, so the next install of the same version skips the download or the build.
- What stays: every package you've installed, in every Python and every virtual environment. Purging the cache uninstalls nothing.
- What rebuilds: the next install downloads again. Packages without a wheel for your Mac compile again, which can take minutes for some scientific packages.
- When it helps: reclaiming space, or forcing pip to fetch a fresh copy of a package that installed wrong.
pip cache commands
pip cache list # wheels in the cache
pip cache remove numpy # one package's wheels
pip cache purge # everything
pip install --no-cache-dir torch # install without reading or writing the cache
pip cache purgeremoves all items from both the HTTP cache and the wheels folder.pip cache removetakes a package name or a glob, like"torch*", and removes matching wheels. Use it when one big package is the problem.--no-cache-diris useful for a one-off install of something huge, so it never lands in the cache.
If pip says the cache is disabled or empty when you know it isn't, you're probably running a different pip than you think. which -a pip pip3 lists them; python3 -m pip always uses the pip of that Python.
How big the pip cache gets
Usually hundreds of megabytes. On the developer Mac above, it was 605 MB. It gets bigger if you work with machine learning packages, since each version of a framework like PyTorch is a large download, and pip keeps every version you've installed.
Other Python caches
- uv: keeps its cache in
~/.cache/uv.uv cache cleanempties it;uv cache pruneremoves only entries nothing uses. - conda: keeps downloaded packages in the
pkgsfolder of your conda install.conda clean --allremoves unused packages, tarballs, and index caches. - Virtual environments: a
.venvfolder holds a full copy of every package a project uses. Delete the ones in old projects;pip install -r requirements.txtoruv syncrebuilds them.
Next, Homebrew's cache sits right beside pip's in ~/Library/Caches. Or see every tool's cache.
Disk Forecast finds this for you
pip's cache sits in ~/Library/Caches, so Disk Forecast lists it as the pip entry under Cleanup › Safe to clear › App caches. If you've moved it to ~/.cache/pip, it shows under Package manager caches instead, alongside uv. Virtual environments show up under the build folder rows, as long as a pyproject.toml, requirements.txt, setup.py, or Pipfile sits beside the .venv. Everything goes to the Trash. It's free.
Questions
How do I clear pip cache?
Run pip cache purge, or python3 -m pip cache purge to target a specific Python. It removes everything in pip's cache. To remove one package instead, run pip cache remove followed by its name.
Where is the pip cache on a Mac?
In ~/Library/Caches/pip. Run pip cache dir to confirm. It holds downloaded files in http-v2 (http on older pip) and wheels pip built from source in wheels.
Does pip cache purge uninstall packages?
No. It only empties the cache of downloaded files and built wheels. Every installed package, in every environment, stays. pip downloads again the next time you install.
Is it safe to delete the pip cache folder?
Yes. You can also move ~/Library/Caches/pip to the Trash yourself; pip recreates it. pip cache purge does the same thing without leaving Terminal.
How do I install a package without using the cache?
Add --no-cache-dir: pip install --no-cache-dir package-name. pip neither reads from nor writes to the cache for that install.
Related guides
Know before it's full.
Free. No account, no subscription.
macOS 14 or later · Apple Silicon and Intel · brew install --cask coreyhaines31/tap/diskforecast