Dev tools
pip, uv and conda caches: where they are and how to clear them
Short answer
Yes, you can clear all three caches. pip, uv and conda only keep downloaded packages there, so you'll just download them again the next time you install. Use each tool's own command: pip cache purge, uv cache clean or uv cache prune, and conda clean --all (run it with --dry-run first).
- pip cache
~/Library/Caches/pipon Mac,%LocalAppData%\pip\Cacheon Windows- uv cache
~/.cache/uvon Mac,%LOCALAPPDATA%\uv\cacheon Windows- conda cache
pkgsfolder inside your conda install, shown byconda info- Safe to delete?
- Yes, if you use each tool's own commands. pip, uv and conda download packages again on your next install.
- Size commands
pip cache info,uv cache size --human- Clear commands
pip cache purge,uv cache clean,conda clean --all
Where each cache lives
Each tool keeps a download cache, so you fetch a package once and reuse it. The pip, uv and conda caches aren't your environments or your code. They're copies of what you downloaded, so every command below only costs you a re-download.
- pip keeps an HTTP cache, plus a cache of wheels it's built locally. Defaults:
~/Library/Caches/pipon Mac and%LocalAppData%\pip\Cacheon Windows. SetXDG_CACHE_HOMEand you'll move it on Mac (pip 26.2 and later). - uv keeps one cache for wheels, source builds and Git checkouts. Default:
~/.cache/uvon Mac and%LOCALAPPDATA%\uv\cacheon Windows.UV_CACHE_DIRoverrides it. - conda keeps downloaded packages in a
pkgsfolder. For a default install that's inside the install folder, for example~/miniconda3/pkgs, plus~/.conda/pkgsfor your user. Where it sits depends on where you installed conda, so ask conda.
Don't trust a path from a blog post, including this one, over the tool itself. pip, uv and conda can each print their own cache location:
pip cache dir uv cache dir conda info # see the "package cache" lines
py -m pip cache dir uv cache dir conda info # see the "package cache" lines
How big they are
pip and uv will report a size for you. conda doesn't have a size command, so you'll measure the folders that conda info lists.
pip cache info uv cache size --human du -sh ~/miniconda3/pkgs ~/.conda/pkgs
# PowerShell py -m pip cache info uv cache size --human (Get-ChildItem "$env:USERPROFILE\miniconda3\pkgs" -Recurse -File | Measure-Object Length -Sum).Sum / 1GB
A light pip user might see a few hundred MB. Once you've installed machine learning packages you'll see several GB, because those wheels are large. conda keeps old versions of every package it's ever installed, so you'll often find its pkgs folder is the biggest of the three. Your pip, uv and conda numbers will differ, so measure before you clean.
Clear them in four steps
Measure each cache
Run the pip and uv size commands above, then measure the conda folders. Clean whichever one's biggest first.
Clear pip
pip cache purge # or one package only: pip cache remove numpy
py -m pip cache purge # or one package only: py -m pip cache remove numpy
purgeremoves the wheel cache and the HTTP cache. you'll download each package again on your next install, and anything that needs compiling gets built again, which can take minutes.Clear uv
uv cache prune # only unused entries uv cache clean # everything
uv cache prune # only unused entries uv cache clean # everything
pruneremoves unused entries, so you can run it on a schedule.cleanempties the cache, so the next uv sync downloads packages again. Use these commands rather than deleting folders: the uv docs say it's never safe to modify the cache directly.Clear conda, dry run first
conda clean --all --dry-run conda clean --all
conda clean --all --dry-run conda clean --all
--allremoves the index cache, unused cached packages, tarballs, temp files and log files.--dry-runonly prints what would go. you'll fetch package tarballs and the index again when you need them.
Safepip cache purge, uv cache prune and conda clean --tarballs only remove downloaded copies. Your projects and code aren't touched. You pay with a later download.
Carefuluv cache clean and pip cache purge make your next install slower and need the network. Don't run them just before a flight or on a bad connection. Run conda clean --all --dry-run first.
Do notrun conda clean --force-pkgs-dirs casually. The conda docs warn it removes every writable package cache and breaks environments whose packages link back to it. Also don't delete cache folders by hand.
Why conda needs more care
conda stores each package once in pkgs and links it into environments. That saves space, and it's why conda clean --packages only removes packages no environment uses. The conda docs warn that environments not listed by conda info --envs aren't checked for links back to the cache, so an environment you created in an unusual place could lose files.
If you only want the low-risk part, use conda clean --tarballs and conda clean --index-cache. They don't touch anything but downloaded archives and the cached package index.
The same rule applies to --force-pkgs-dirs. It isn't part of --all for a reason, so leave it alone unless you plan to rebuild your conda environments.
See what is using your disk
The pip, uv and conda commands above tell you what each tool thinks it holds. For a wider view, Prune is a disk cleaner for Mac and Windows that shows what is using your disk across developer caches, AI model folders and more. The scan's free and shows exact GB per item. Prune doesn't delete anything blind: you review each item before it's removed.
If your disk is full because of Python tooling, see also is the npm cache safe to delete for the JavaScript side of the same problem.
FAQ
Will clearing the pip cache break my virtual environments?
No. The pip cache is separate from installed packages. pip only needs it again when you next install something, and then it downloads or rebuilds the package.
Is it safe to delete the uv cache folder directly?
No. The uv docs say it's never safe to modify the cache directly. Use uv cache clean or uv cache prune instead.
Can I move these caches to another drive?
Yes. uv reads UV_CACHE_DIR, and conda reads CONDA_PKGS_DIRS. Set the variable to a folder on the other drive and it works the same on Mac and Windows. For uv, keep the cache on the same file system as your environments, and you'll get faster installs.
How do I find a cache folder if my path looks different?
Ask the tool: run pip cache dir, uv cache dir, or conda info. Whatever path it prints is the one it uses.