uv cache on Mac: safe to delete? How to clear it
Quit first: uv
Where it is
~/.cache/uv~/Library/Caches/uv
What it is
uv, Astral's fast Python package manager, keeps a global cache of downloaded and built distributions, git checkouts, and the environments it creates for tools run with uvx. Virtual environments are populated from this cache by cloning or linking files, which is a big part of why uv is fast.
Why it gets so big
uv keeps every version it has resolved for every project, and each uvx tool, including MCP servers launched that way, adds its own cached environment. Heavy machine learning packages make it grow quickly.
Is it safe to delete?
Yes. Make sure no uv command is running first, since uv locks the cache while it works. Afterwards the next install or uvx run downloads what it needs again. Virtual environments created with uv's default link mode keep working because their files are cloned or copied, not referenced.
Tip
uv's cache prune subcommand removes only unused entries, a gentler alternative to a full clean.
See how much space it uses
du -sh "$HOME/.cache/uv" "$HOME/Library/Caches/uv" 2>/dev/nullClean it with the tool’s own command
uv cache cleanDelete it by hand
Run in Terminal. Deleting cannot be undone, so check the paths first.
rm -rf "$HOME/.cache/uv"/*
rm -rf "$HOME/Library/Caches/uv"/*