docker-container-cleaner
CLI tool to clean up stopped Docker containers, unused images, volumes, and networks to free up disk space.
Why use this skill?
Efficiently clean up stopped Docker containers, unused images, volumes, and networks. Reclaim disk space and maintain a performant Docker environment with this CLI tool.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/derick001/docker-container-cleanerWhat This Skill Does
The docker-container-cleaner is a comprehensive CLI utility designed to maintain healthy Docker environments by automating the removal of stagnant resources. As developers work with Docker, disk usage often accumulates rapidly due to stopped containers, orphaned image layers, and unused volumes or networks. This tool acts as an intelligent janitor for your Docker daemon. It allows you to selectively clean specific resource types or perform a comprehensive system-wide sweep to reclaim disk space. It emphasizes safety through its interactive mode, which provides a detailed breakdown of what will be deleted and the amount of space that will be recovered before any destructive action is taken. Furthermore, for automation experts, the tool provides machine-readable JSON output, making it an essential component for monitoring scripts and CI/CD maintenance pipelines.
Installation
To integrate this utility into your OpenClaw environment, use the following command: clawhub install openclaw/skills/skills/derick001/docker-container-cleaner
Use Cases
- Development Cleanup: Quickly clear out stale containers after a local testing session to prevent 'disk space full' errors.
- CI/CD Maintenance: Automate daily or weekly cleanup tasks in automated pipelines to ensure build runners remain performant.
- Storage Management: Use the tool to identify which specific resources (containers vs. volumes vs. images) are consuming the most space on your host machine.
- Production Audits: Retrieve usage statistics in JSON format to report on resource density across your Docker environment.
Example Prompts
- "Check how much space I can save by running the docker-container-cleaner and show me the details."
- "I need to clean up my Docker environment. Run the container cleaner safely, but please only remove stopped containers and dangling images."
- "Perform a full force cleanup of all unused Docker resources and report back when finished."
Tips & Limitations
- Dry Run First: Always utilize the
--dry-runflag if you are uncertain about what will be removed, especially in a shared development environment. - Permissions: Ensure your user has sufficient permissions to access the Docker daemon, as this tool requires root-level or docker-group access to manage system resources.
- Network Persistence: Be cautious when removing unused networks, as some projects rely on persistent networks that might appear unused while containers are momentarily stopped.
- Data Safety: While this tool identifies 'unused' volumes, exercise extreme caution as these may contain persistent database files or logs that you might wish to keep for future reference.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-derick001-docker-container-cleaner": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, code-execution
Related Skills
multi-chat-context-manager
CLI tool to store and retrieve conversation contexts per channel/user.
ssl-certificate-monitor
Monitor SSL certificates for expiration, security issues, and compliance across domains and subdomains.
secret-detection
Git hook to detect secrets before commit.
ssh-config-manager
CLI tool to manage SSH config files, organize hosts, generate configs, and test connections.
api-endpoint-tester
CLI tool to test REST API endpoints with various HTTP methods, headers, and payloads.