Python virtual environments on a Mac: finding orphan .venv folders and the pip, conda and uv caches
Every Python project that uses <code>python -m venv</code> gets its own copy of every package. You make one, forget it, and it stays. We scanned one developer Mac on 13 November 2026 to see how much that adds up to.
What we found: 32 environments, 3.1 GB
| Measure | Result |
|---|---|
| Virtual environments found under the home folder | 32 |
| Total size | 3.1 GB (3,183 MB) |
| Python 3.13 / 3.12 / 3.10 | 26 envs, 2.8 GB / 5 envs, 0.28 GB / 1 env, 0.01 GB |
| Larger than 100 MB | 8 environments, 1.7 GB (55% of the total) |
| Biggest one | 785 MB (25% of the total, see below) |
| Not touched in the last 14 days (folder date) | 9 environments, 0.57 GB |
| Broken: its Python no longer exists | 1 (12 MB). It was made on Windows and copied over, so home pointed at C:\Python310 |
pip download cache (~/Library/Caches/pip) | 101 MB, 344 cached HTTP files, 0 locally built wheels |
| conda, uv, pyenv | Not installed on this Mac, so no ~/.conda/pkgs to count |
Why one environment is 785 MB
The average here is 100 MB, but one environment was eight times that. We looked inside its <code>site-packages</code>:
| Package | Size |
|---|---|
| kubernetes | 81 MB |
| onnxruntime | 80 MB |
| pandas | 71 MB |
| chromadb (Rust bindings) | 50 MB |
| duckdb | 44 MB |
| grpc | 40 MB |
Six packages are 366 MB. Nothing is wrong: a project that depends on a machine-learning runtime and a vector store is just big. The point is that you can't guess from the folder name, so measure.
Find them all (read-only)
<code>find</code> does the job without extra tools. Every environment has a <code>pyvenv.cfg</code> file, so look for that. Save this as <code>venvscan.sh</code> and pass the folders where you keep code:
On our Mac it scanned about 30 folders' worth of projects in 22 seconds and printed the 32 lines behind the table above. If you have <code>fd</code>, <code>fd -H -t f pyvenv.cfg ~/projects</code> does the finding faster. The <code>du</code> still takes the time.
Which ones are really orphans?
A big old environment isn't automatically junk. Go through these in order:
- BROKEN-PYTHON in the last column: its Python is gone, so it can't run anyway. Delete it. (Ours was the Windows one.)
- The project folder is gone or archived: if the folder next to the venv has no source files, the venv is an orphan.
- Nothing in the project has changed for months: in the project folder run
git log -1 --format=%cd. The venv's folder date only says when packages were installed, not when you last used it. - Is there a requirements file? If
requirements.txt,pyproject.tomlor a lock file exists, you can rebuild the venv in a minute or two withpython3 -m venv .venv && .venv/bin/pip install -r requirements.txt. If there isn't one, run.venv/bin/pip freeze > requirements.txtbefore you delete it.
Deleting a venv never touches your code. It's a folder of installed packages. Move it to the Trash for a day if you want a way back.
The package caches
On our Mac the pip cache was 101 MB: the smallest line in the table. If you use conda, <code>~/.conda/pkgs</code> and <code>~/miniconda3/pkgs</code> are the places to look, and the <code>--dry-run</code> run above tells you the number. We didn't have conda installed, so that part isn't a measurement from our Mac.
Per-project habit that stops this
- Keep one
.venvinside each project folder, so deleting the project deletes its environment. - Write
requirements.txt(or a lock file) so any environment can be thrown away and rebuilt. - When you archive an old project, delete its
.venvandnode_modulesfirst.
Related: Developer disk hogs: Gradle, npm, node_modules and the caches that never go away and Homebrew storage on a Mac.
Zofle, our free Mac app, finds big developer folders like old environments and shows what each one is before you remove anything.
Download Zofle for MacSources
- Python docs: venv, creation of virtual environments (the
pyvenv.cfgfile and itshomekey). - pip docs: pip cache.
- conda docs: conda clean. uv docs: Caching.
- Our own scan of one Mac on 13 November 2026 (
find,du,pip cache info); the script above is the one we ran. - The conda and uv commands are from their documentation; those tools weren't installed on the Mac we measured.
Zofle Pro news
People signing up now will get Zofle Pro, with more features, for free when we launch it.