WindowsmacOSLinux

Where Does uv Store Cache and Python Installs?

uv separates disposable cache data from persistent data such as managed Python installs. Both locations follow XDG or known folder conventions.

Last updated

Cache holds wheels, source builds, git checkouts, and index metadata. Managed Pythons installed with uv python install live under a python subdirectory of the data directory.

Run uv cache dir and uv python dir to print the effective paths on the current machine. Command line flags and env vars override the defaults described below.

Where uv stores this, by platform

Windows
%LOCALAPPDATA%\uv\cache

Cache default (example: C:\Users\<user>\AppData\Local\uv\cache). Override with --cache-dir, UV_CACHE_DIR, or tool.uv.cache-dir. Keep it on the same filesystem as venvs to allow hardlinks.

Windows
%LOCALAPPDATA%\uv\python

Managed Python installs default. Override with UV_PYTHON_INSTALL_DIR. Verify with uv python dir.

macOS
$XDG_CACHE_HOME/uv or ~/.cache/uv

Unix cache rule applies to macOS and Linux. If XDG_CACHE_HOME is set, $XDG_CACHE_HOME/uv is used, else ~/.cache/uv. Override with UV_CACHE_DIR or --cache-dir. Verify with uv cache dir.

macOS
~/.local/share/uv/python

Managed Python installs under python subdirectory of the data dir. Override with UV_PYTHON_INSTALL_DIR. Verify with uv python dir.

Linux
$XDG_CACHE_HOME/uv or ~/.cache/uv

Same Unix cache rule as macOS. Precedence is --no-cache temp dir, then --cache-dir or UV_CACHE_DIR or config, then system default. Use uv cache dir to confirm.

Linux
~/.local/share/uv/python

Full form is $XDG_DATA_HOME/uv/python else ~/.local/share/uv/python. Override with UV_PYTHON_INSTALL_DIR. Verify with uv python dir.

Frequently asked questions

How do I change the uv cache location?

Set UV_CACHE_DIR=/path/to/cache, or pass --cache-dir /path/to/cache, or set cache-dir in uv.toml or pyproject.toml under tool.uv. Command line beats env var, env var beats config file.

How do I change where managed Pythons are installed?

Set UV_PYTHON_INSTALL_DIR=/path/to/python (example: /opt/python) then run uv python install. Run uv python dir afterward to confirm the effective directory.

Notice an outdated path? Let us know.