Skip to main content

🐳 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 yes to proceed with the cleanup.
  • Type no to 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 -y for immediate cleanup.
  • 🐍 Easy Installation: Installable via pip.

📝 Contributing

  1. Fork the repository.
  2. Create a new branch: git checkout -b feature/your-feature.
  3. Make your changes and commit: git commit -am 'Add new feature'.
  4. Push to the branch: git push origin feature/your-feature.
  5. 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! 🚀

Metadata

Release files for docker-cleanup 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docker-cleanup 1.0.0
File Size Uploaded Provenance
docker_cleanup-1.0.0.tar.gz 5.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for docker-cleanup 1.0.0
File Interpreter ABI Platform
docker_cleanup-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / docker_cleanup-1.0.0.tar.gz

Download URL docker_cleanup-1.0.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
30c750bbe3d2b4cf68449f58b82daffff40c5205472a25047a0a506596e8bdf1
BLAKE2b-256 checksum
How to use checksums
a16595afe3694f6b27f2a5d6e27f730e6aa5d4ccafbb7bac8a3c225883ec938a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Release files / docker_cleanup-1.0.0-py3-none-any.whl

Download URL docker_cleanup-1.0.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
556e92e36e47fe49efc023c65dc7a48d9227b90a6835218f17f78e982786f71b
BLAKE2b-256 checksum
How to use checksums
31bbb778f102e6a07c29bd02e7792476079899dbbf51b89f4d2338590e7a265e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.4

Security for docker-cleanup 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page