A CLI tool to clean all Docker resources quickly
Project description
🐳 docker-cleanup
A CLI tool to clean all Docker resources (containers, images, volumes, networks, caches) with a single command.
📦 Installation
To install docker-cleanup from PyPI, run:
pip install docker-cleanup
Or, if you're installing locally from the source:
pip install .
🚀 Usage
docker-cleanup provides a straightforward way to clean up Docker environments.
Interactive Mode (with Confirmation)
Run the command and confirm the cleanup manually:
docker-cleanup
- After running the command, you'll be prompted to confirm the cleanup:
⚠️ This will delete all Docker data (containers, images, volumes, networks). Are you sure? (yes/no): - Type
yesto proceed with the cleanup. - Type
noto cancel the operation.
This mode is ideal when you want to review the operation before execution.
Non-Interactive Mode (Skip Confirmation)
Use the -y flag to skip confirmation and immediately perform the cleanup:
docker-cleanup -y
🐳 Prerequisite: Running Docker Without sudo
Before using docker-cleanup, ensure Docker commands can be executed without requiring sudo privileges.
If Docker commands like docker ps or docker system prune require sudo, follow the official Docker documentation to configure your user permissions:
👉 Post-Installation Steps for Linux
⚠️ Important: Without completing this setup, you’ll need to run docker-cleanup with sudo, which may not work seamlessly with the tool.
Ensure Docker runs without sudo for the best experience with docker-cleanup! 🚀
⚠️ Warning
- This tool will delete all Docker containers, images, volumes, networks, and caches.
- The operation is irreversible. Ensure you have backed up any important data before proceeding.
🛠️ Features
- 🗑️ Full Cleanup: Removes all containers, images, volumes, and networks.
- ⚡ Fast Execution: Skip confirmation with
-yfor immediate cleanup. - 🐍 Easy Installation: Installable via
pip.
📝 Contributing
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature. - Make your changes and commit:
git commit -am 'Add new feature'. - Push to the branch:
git push origin feature/your-feature. - Submit a pull request.
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
🤝 Support
If you encounter any issues, please open an issue on GitHub.
Enjoy cleaner Docker environments! 🐳✨
🤖 Acknowledgment
This project was initially conceptualized and structured with the assistance of ChatGPT by OpenAI. ChatGPT provided guidance on designing the CLI tool, structuring the project for packaging, and creating clear documentation.
While the tool's functionality and final implementation are the result of developer effort, the collaborative brainstorming with ChatGPT played a valuable role in shaping its foundation.
Thank you, ChatGPT, for being an insightful assistant! 🚀
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 docker_cleanup-1.0.0.tar.gz.
File metadata
- Download URL: docker_cleanup-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30c750bbe3d2b4cf68449f58b82daffff40c5205472a25047a0a506596e8bdf1
|
|
| MD5 |
920bc56977a4c6578b1a5052b0dddacb
|
|
| BLAKE2b-256 |
a16595afe3694f6b27f2a5d6e27f730e6aa5d4ccafbb7bac8a3c225883ec938a
|
File details
Details for the file docker_cleanup-1.0.0-py3-none-any.whl.
File metadata
- Download URL: docker_cleanup-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
556e92e36e47fe49efc023c65dc7a48d9227b90a6835218f17f78e982786f71b
|
|
| MD5 |
4e92edc5820afd90ca6fb5651f3ac6d4
|
|
| BLAKE2b-256 |
31bbb778f102e6a07c29bd02e7792476079899dbbf51b89f4d2338590e7a265e
|