ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/derick001/docker-container-cleaner
Or

What 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

  1. "Check how much space I can save by running the docker-container-cleaner and show me the details."
  2. "I need to clean up my Docker environment. Run the container cleaner safely, but please only remove stopped containers and dangling images."
  3. "Perform a full force cleanup of all unused Docker resources and report back when finished."

Tips & Limitations

  • Dry Run First: Always utilize the --dry-run flag 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

Author@derick001
Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-derick001-docker-container-cleaner": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#docker#devops#storage#cleanup#containers
Safety Score: 3/5

Flags: file-write, code-execution