β β β β β ββββ β β ____
βββ β β β β β β β .'`_ o `;__,
β ββ β β β βββββ ββββ . .'.'` '---' '
β β β β β β β β .`-...-'.'A tool to delete virtual environments (.venv, Conda, Poetry)
β βββ `-...-'and clean up __pycache__ and temp files.
killpy
is a simple tool designed to locate and delete .venv
directories from your projects, including virtual environments created by Poetry and Conda. It can help you quickly clean up unnecessary virtual environments and save disk space.
- Automatic search: Finds all .venv directories and any folders containing a pyvenv.cfg file recursively from the current working directory, as they are considered virtual environment folders.
- Support for Conda: Lists all available Conda environments.
- Safe deletion: Lists the directories to be deleted and asks for confirmation.
- Fast and lightweight: Minimal dependencies for quick execution.
To install killpy
, use pip:
pip install killpy
Run the following command to search for .venv directories and any folders containing a pyvenv.cfg file, as well as to list all Conda environments from the current directory and all its subdirectories recursively:
killpy
With pipx
pipx run killpy
With uvx
uvx killpy
- To close the application, press
Ctrl+Q
. - To mark a virtual environment for deletion, press
D
. - To confirm deletion of marked virtual environments, press
Ctrl+D
. - To delete a virtual environment immediately, press
Shift+Delete
. - To clean up pycache folders, press
P
.
- Delete
__pycache__
Files - Remove
dist
Folders and Build Artifacts - Clean Up Installed Package Cache
- Delete
.egg-info
and.dist-info
Files - Analyze and Remove Unused Dependencies
- Optimize Disk Space in Python Projects
Contributions are welcome! If you'd like to improve this tool, feel free to fork the repository and submit a pull request.
- Fork the repository
- Create a new branch for your feature:
git checkout -b my-feature
- Commit your changes:
git commit -m 'Add my feature'
- Push to the branch:
git push origin my-feature
- Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
Thank you for using killpy
! If you find it useful, please star the repository on GitHub!