β β β β β ββββ β β ____
βββ β β β β β β β .'`_ o `;__,
β ββ β β β βββββ ββββ . .'.'` '---' '
β β β β β β β β .`-...-'.'Reclaim disk space by cleaning unused Python environments.
β βββ `-...-'
Reclaim disk space by finding and removing Python environments you no longer use.
killpy discovers:
.venvfolders- folders that contain
pyvenv.cfg - Poetry virtual environments
- Conda environments
- installed
pipxpackages __pycache__directories
It shows sizes and lets you remove things explicitly from an interactive terminal UI.
Install:
pip install killpyRun from current directory:
killpyScan a specific path:
killpy --path /path/to/projectWithout installing:
pipx run killpyor
uvx killpy- Fast discovery of Python environments with size metadata.
- Safer cleanup flow with explicit mark/delete actions.
- Works across tools (
venv,pyvenv.cfg, Poetry, Conda,pipx). - Includes cache cleanup via
killpy cleanor UI shortcut.
Ctrl+Q: close the appD: mark selected virtual environment for deletionCtrl+D: delete marked virtual environmentsShift+Delete: delete selected virtual environment immediatelyP: clean__pycache__foldersU: uninstall selectedpipxpackage
Main app:
killpyor
killpy --path /path/to/projectCache cleanup command:
killpy cleanor
killpy clean --path /path/to/projectkillpy performs destructive actions (environment/package/cache deletion).
Always review selected items before confirming removal.
You are responsible for files deleted on your system.
Use killpy clean before each commit to remove cache directories:
- repo: https://github.com/Tlaloc-Es/KillPy
rev: 0.15.7
hooks:
- id: killpy
pass_filenames: falseDoes it fail if Conda or pipx are not installed?
No. Missing tools are handled gracefully.
Can I scan outside the current folder?
Yes. Use killpy --path /target/path.
Does it auto-delete anything on startup?
No. Deletion requires explicit user action.
- Project behavior and guardrails are documented in AGENTS.md.
- Useful local checks:
uv python -m compileall killpy
pre-commit run --all-files- Delete
__pycache__folders - Remove
distfolders and build artifacts - Clean installed package caches
- Delete
.egg-infoand.dist-infofolders - Analyze and remove unused dependencies
Contributions are welcome.
- Fork the repository
- Create a branch:
git checkout -b my-feature - Commit your changes:
git commit -m 'Add my feature' - Push your branch:
git push origin my-feature - Open a pull request
MIT. See LICENSE.
If killpy saved you time or disk space, consider starring the repo β
