Where Does uv Store Its Cache?
Where uv keeps its package cache on each OS, and the command and variable that reveal or move it.
Last updated
uv caches downloaded and built packages in one directory so repeat installs skip the network: ~/.cache/uv on Linux and macOS, %LOCALAPPDATA%\uv\cache on Windows. Environments link against it, which is why installs feel instant the second time.
The location is configurable at four levels (flag, environment variable, project config, user config), so the default is a starting guess, not an answer. UV_CACHE_DIR moves the whole cache in one line, and it is the standard fix for full home directories and split filesystem link failures.
Where uv stores this, by platform
~/.cache/uv
Respects $XDG_CACHE_HOME when set. Run uv cache dir to confirm the live path. Move it with UV_CACHE_DIR or cache-dir in uv.toml. Prune with uv cache prune.
~/.cache/uv
Same layout and commands as Linux. Deleting the folder is safe: uv rebuilds it on the next sync.
%LOCALAPPDATA%\uv\cache
Paste %LOCALAPPDATA%\uv\cache into Explorer. Same uv cache dir check and UV_CACHE_DIR override as other platforms.
Frequently asked questions
How do I find the cache uv is actually using?
Run uv cache dir inside your project. The cache must sit on the same filesystem as your environments for linking to work, so per drive or configured locations override the default more often than people expect.
How do I reclaim disk space from the uv cache?
Run uv cache prune to drop unreferenced packages, or uv cache clean to empty it fully. Deletion is always safe: the next sync refetches whatever projects still need. Bloated CI disks are the classic reason to run it.
Notice an outdated path? Let us know.