Find and delete old Python environments

Every project's virtual environment is a full copy of its packages. Old ones add up.

Find virtual environments

 Terminal
find ~ -name pyvenv.cfg -not -path '*/Library/*' 2>/dev/null | while read f; do du -sh "$(dirname "$f")"; done | sort -h

Delete the folder (often .venv or venv) of a project you no longer use. Recreate it with python -m venv .venv && pip install -r requirements.txt.

conda

 Terminal
conda env list
conda remove -n <name> --all
conda clean --all

Package caches

 Terminal
pip cache purge
uv cache clean
Let the raccoon do it, safely

Junk Raccoon finds this clutter for you, shows every file first, and keeps a one-click way back. Free beta for Mac.

Download for Mac