List all .venv directories and Conda environments 🐍 on your system and check how much space they are using. You can then choose which ones to delete in order to free up space 🧹.
Project description
█ ▄ ▄ █ █ ▄▄▄▄ ▄ ▄ ____
█▄▀ ▄ █ █ █ █ █ █ .'`_ o `;__,
█ ▀▄ █ █ █ █▄▄▄▀ ▀▀▀█ . .'.'` '---' '
█ █ █ █ █ █ ▄ █ .`-...-'.'Reclaim disk space by cleaning unused Python environments.
▀ ▀▀▀ `-...-'
Delete .venv (Virtualenv, Poetry and Conda) Directories
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.
Features
- 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.
Installation
To install killpy, use pip:
pip install killpy
Usage
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
To scan a different directory instead of the current one:
killpy --path /path/to/project
With pipx
pipx run killpy
pipx run killpy --path /path/to/project
With uvx
uvx killpy
uvx killpy --path /path/to/project
- 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, pressP.
Disclaimer
killpy performs destructive actions (environment/package/cache deletion).
By using this tool, you accept full responsibility for any deleted files or
unexpected data loss. The killpy team is not responsible for unintended or
unexpected deletions.
Pre-Commit
To automatically use KillPy on each commit, you can add a pre-commit hook to your project. This will clean cache directories (like __pycache__) and other unnecessary files before every commit.
- repo: https://github.com/Tlaloc-Es/KillPy
rev: 0.15.7
hooks:
- id: killpy
pass_filenames: false
Roadmap
- Delete
__pycache__Files - Remove
distFolders and Build Artifacts - Clean Up Installed Package Cache
- Delete
.egg-infoand.dist-infoFiles - Analyze and Remove Unused Dependencies
- Optimize Disk Space in Python Projects
Contributing
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
License
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!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file killpy-0.15.7.tar.gz.
File metadata
- Download URL: killpy-0.15.7.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
605944b589bc5d0e5a65046d12628ebe8440bb99e6c257ac9b4f9ca3325480b6
|
|
| MD5 |
5a862f92177c356dd3e6ecb1efcd39f4
|
|
| BLAKE2b-256 |
d40e9bc9c833187712e6d01eaf0bee6e5f91df92e655472597f72becbf2dafab
|
File details
Details for the file killpy-0.15.7-py3-none-any.whl.
File metadata
- Download URL: killpy-0.15.7-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
332f070cb0b89b32c56a3b2728aba1a74a011bd9d5ae86add02458416989a4a5
|
|
| MD5 |
dfa38141450a61f3651bb7f8e6167e0a
|
|
| BLAKE2b-256 |
700bf95bb10a58768a189efe752f69f0f6c134088c61aa1c2fd9acad960cc2ac
|