🧹 Docker Volume Cleaner (dockreap)
dockreap is a lightweight Python CLI tool that helps you identify and remove unused anonymous Docker volumes — including symlinks and their targets 🗑️
Keep your Docker environment tidy, automated, and efficient 🚀
⚙️ Features
- Detects anonymous Docker volumes (64-character hash names)
- 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 external dependencies
📦 Installation
Install from PyPI (recommended)
pip install dockreap
or with an isolated environment:
pipx install dockreap
Install from source (development)
git clone https://github.com/kevinveenbirkenbach/dockreap.git
cd dockreap
pip install .
🧪 Usage
# 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/bootstrapare automatically excluded. - If a volume’s
_datadirectory is a symlink, both the symlink and its target directory are removed. - Volumes referenced by any container (running or stopped) are not deleted.
🔐 Requirements
- Python ≥ 3.9
- Docker CLI available and configured
- Sufficient permissions to remove Docker volumes
(usually requires
rootor membership in thedockergroup)
📜 License
This project is licensed under the MIT License.
👤 Author
Kevin Veen-Birkenbach 🌍 https://www.veen.world/
Metadata
Release files for dockreap 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dockreap-1.0.1.tar.gz | 4.6 kB | Without provenance | Details for dockreap-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dockreap-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for dockreap-1.0.1-py3-none-any.whl |
Total release size: 9.7 kB
Release files / dockreap-1.0.1.tar.gz
| Download URL | dockreap-1.0.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d6a4baeedb45ddaa010c5ea3b0c4711d0601e723446791220fa4cc610c966c7
|
|
BLAKE2b-256 checksum How to use checksums |
058b05626636958bebb567e6a044140a57f3e9c6a3d8dfc6e472f9de9aa61077
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Release files / dockreap-1.0.1-py3-none-any.whl
| Download URL | dockreap-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26756f2a92a599274dc6f0f754923b8dbd1cf787a6ff8f6cb4f6dba39f409c9b
|
|
BLAKE2b-256 checksum How to use checksums |
8077680b214535ca84d5c29d78385abc644f64426bd8683e895c209510502c1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.11
|
Security for dockreap 1.0.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.