Skip to main content

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 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! 🚀

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docker_cleanup-1.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docker_cleanup-1.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for docker_cleanup-1.0.0.tar.gz
Algorithm Hash digest
SHA256 30c750bbe3d2b4cf68449f58b82daffff40c5205472a25047a0a506596e8bdf1
MD5 920bc56977a4c6578b1a5052b0dddacb
BLAKE2b-256 a16595afe3694f6b27f2a5d6e27f730e6aa5d4ccafbb7bac8a3c225883ec938a

See more details on using hashes here.

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

Hashes for docker_cleanup-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 556e92e36e47fe49efc023c65dc7a48d9227b90a6835218f17f78e982786f71b
MD5 4e92edc5820afd90ca6fb5651f3ac6d4
BLAKE2b-256 31bbb778f102e6a07c29bd02e7792476079899dbbf51b89f4d2338590e7a265e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page