Files
dockreap/README.md

74 lines
2.4 KiB
Markdown
Raw Normal View History

2025-04-07 14:47:10 +02:00
# 🧹 Docker Volume Cleaner
2025-12-28 11:10:36 +01:00
[![GitHub Sponsors](https://img.shields.io/badge/Sponsor-GitHub%20Sponsors-blue?logo=github)](https://github.com/sponsors/kevinveenbirkenbach) [![Patreon](https://img.shields.io/badge/Support-Patreon-orange?logo=patreon)](https://www.patreon.com/c/kevinveenbirkenbach) [![Buy Me a Coffee](https://img.shields.io/badge/Buy%20me%20a%20Coffee-Funding-yellow?logo=buymeacoffee)](https://buymeacoffee.com/kevinveenbirkenbach) [![PayPal](https://img.shields.io/badge/Donate-PayPal-blue?logo=paypal)](https://s.veen.world/paypaldonate)
2025-04-07 14:47:10 +02:00
**Docker Volume Cleaner** is a lightweight Python tool that helps you identify and remove unused anonymous Docker volumes — including symlinks and their targets 🗑️
Keep your Docker environment tidy, automated, and efficient 🚀
---
2025-04-07 14:56:04 +02:00
## ⚙️ Features
- Detects all anonymous Docker volumes (64-character hashes)
- Skips whitelisted volumes
- Skips bootstrap mounts (`/var/www/bootstrap`)
- Cleans up symlinks **and** their target directories
- Optional confirmation prompt via `--no-confirmation`
- Pure Python — **no dependencies**
---
2025-04-07 14:47:10 +02:00
## 📦 Installation
Install it using [Kevins Package Manager](https://github.com/kevinveenbirkenbach/package-manager) with the alias:
```bash
pkgmgr install dockreap
```
> `dockreap` is the alias for this tool within `pkgmgr`.
> Repository: [github.com/kevinveenbirkenbach/docker-volume-cleaner](https://github.com/kevinveenbirkenbach/docker-volume-cleaner)
---
2025-04-07 14:56:04 +02:00
## 🧪 How to Use
2025-04-07 14:47:10 +02:00
2025-04-07 14:56:04 +02:00
```bash
# Basic usage with confirmation prompt
dockreap
# Skip confirmation
dockreap --no-confirmation
# Skip specific volumes by adding them to the whitelist
dockreap "volumeid1 volumeid2"
# Skip confirmation + whitelist
dockreap "volumeid1 volumeid2" --no-confirmation
```
📝 Notes:
- Only volumes with 64-character hash names (anonymous volumes) are considered.
- Volumes mounted at `/var/www/bootstrap` are automatically excluded.
- If a volume directory is a **symlink**, both the symlink and its target are removed.
2025-04-07 14:47:10 +02:00
---
## 📜 License
This project is licensed under the **MIT License**.
---
## 🤖 Built with ChatGPT
Developed with the help of [ChatGPT]([https://chat.openai.com/share/7b177eef-b97f-4e63-b2ef-cfdc69c2337e](https://chatgpt.com/share/67f3c910-2ea0-800f-85db-71ec39a713f2)) 🤝
---
## 👤 Author
**Kevin Veen-Birkenbach**
🌍 [https://www.veen.world/](https://www.veen.world/)