Where Does PDM Store Venvs and Caches?
PDM creates project .venv folders by default, central venvs and wheel caches elsewhere. Locations, overrides and PEP 582 mode.
Last updated
PDM defaults to a .venv inside each project root on first install, the layout other managers made familiar. Named or shared venvs instead go under a central venvs tree. A wheel cache sits apart and hard-links installs into projects, managed automatically and pruned when unreferenced.
Flip venv.in_project to false to centralize everything, or point venv.location at a custom parent. Inspect cache usage with pdm cache info and relocate it with cache_dir (PDM_CACHE_DIR). Disable venvs entirely and PDM falls back to __pypackages__ PEP 582 mode. Commit pyproject.toml, pdm.lock and pdm.toml; never .pdm-python.
Where Pdm stores this, by platform
<project root>\.venv
Default in-project venv. Central venvs and caches follow the same config keys with Windows-appropriate roots. PDM also probes the registry for interpreters here.
<project root>/.venv
Same default. Central venvs under ~/.local/share/pdm/venvs, wheel cache under ~/.cache/pdm. pdm config venv.location and cache_dir relocate either.
<project root>/.venv
Mirrors macOS exactly. Hand-deleting cache files can break linked projects; prefer pdm cache remove with a pattern. PEP 582 mode skips venvs for __pypackages__.
Frequently asked questions
Where did PDM put my virtualenv?
In <project>/.venv by default. Named venvs live under the venv.location root (~/.local/share/pdm/venvs). Run pdm info or check .pdm-python to confirm which interpreter a project actually uses.
How do I clear the PDM wheel cache?
Use pdm cache remove <pattern> rather than deleting files, since projects hard-link into the cache at ~/.cache/pdm (PDM_CACHE_DIR to move it). Check usage first with pdm cache info.
Notice an outdated path? Let us know.