uv's cache, its Python installs, and the commands that clean both
uv keeps packages in ~/.cache/uv and whole Python versions in ~/.local/share/uv. Where each lives, what uv cache prune removes, and what it leaves.
uv replaces pip, virtualenv and pyenv in one tool, so its disk use comes in three parts: a package cache, managed Python versions, and installed tools. Each lives in a different folder.
Where uv keeps things
| Path | What | Cleaned by |
|---|---|---|
~/.cache/uv | Package cache | uv cache clean or uv cache prune |
~/.local/share/uv/python | Managed Python versions | uv python uninstall |
~/.local/share/uv/tools | Tools from uv tool install | uv tool uninstall |
.venv in each project | The project environment | Delete; uv sync rebuilds it |
uv cache dir
du -sh "$(uv cache dir)" ~/.local/share/uv/* 2>/dev/null
uv python list --only-installedprune or clean
uv cache pruneremoves entries nothing refers to any more, such as old versions and interrupted downloads. Safe to run any time.uv cache cleanempties the cache completely. The next install downloads everything again.- Neither touches installed Pythons or tools.
Like Bun, uv links packages from its cache into each .venv using APFS clones on a Mac, so environments cost less on disk than their folder sizes suggest. APFS clones and copies explains why.
Old Python versions
uv python list --only-installed
uv python uninstall 3.11The rest of Python's footprint, pip's cache and Homebrew Pythons, is in Python taking up space, and environments from conda in conda environments.
Common questions
Where is the uv cache on a Mac?
In ~/.cache/uv by default. Run uv cache dir to print the path in use.
What is the difference between uv cache prune and uv cache clean?
prune removes only entries nothing uses any more. clean empties the cache entirely.
Where does uv install Python versions?
In ~/.local/share/uv/python. List them with uv python list --only-installed and remove one with uv python uninstall.
Does clearing the uv cache break my virtual environments?
No. Environments keep working. They are rebuilt from the cache or the network only when you sync again.