Docker Container Cleaner for Openclaw

A specialized CLI utility designed to efficiently prune stopped containers, unused images, and orphaned volumes to optimize Docker disk usage.

derick001
v1.0.0
Feb 28, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install docker-container-cleaner

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install docker-container-cleaner using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Docker Container Cleaner?

This tool is a robust addition to the Openclaw Skills collection, providing developers with a streamlined way to manage their Docker environments. It systematically identifies and removes redundant resources such as stopped containers, dangling images (untagged), and unused networks that often clutter local development and CI/CD environments. By integrating this into your workflow, you can significantly reduce disk bloat and maintain a lean infrastructure.

The utility prioritizes safety through an interactive mode that prompts for confirmation before any destructive actions, ensuring that critical data is never removed by mistake. Whether you are managing a single workstation or a fleet of build servers, this skill offers the granularity needed to keep your containers running efficiently without manual oversight.

Docker Container Cleaner Use Cases

  • Freeing up disk space when Docker storage usage reaches critical levels.
  • Automating routine cleanup of CI/CD runners to prevent storage overflow.
  • Identifying and purging orphaned Docker volumes that remain after container deletion.
  • Pruning old development images to maintain a clean local environment.
  • Integrating with Openclaw Skills for cross-platform resource management.

How Docker Container Cleaner Works

  1. The skill interfaces with the Docker daemon using the local CLI or Python SDK to scan for all existing resources.
  2. It categorizes resources into active, stopped, dangling, or unused states based on their current associations.
  3. A summary report is generated, calculating the potential reclaimable disk space across containers, images, and volumes.
  4. The user selects specific cleanup targets or triggers a prune all operation via command-line arguments.
  5. The tool executes the removal commands and provides a final report on the total space successfully freed.

Docker Container Cleaner Setup

Ensure you have Python 3 and Docker installed and running on your system. These Openclaw Skills require the Docker daemon to be accessible.

# Verify Docker is running
docker ps

# Install the Docker SDK for Python for enhanced performance
pip install docker

# Run the cleanup tool in interactive mode
python3 scripts/main.py clean

Docker Container Cleaner Data Schema & Taxonomy

The skill processes Docker engine metadata and can output technical summaries in the following format:

Field Description
containers Object containing count and size of stopped/running containers
images Metadata for dangling and unused images with size calculations
volumes Statistics on unused persistent storage volumes
reclaimable_mb Integer representing the total MB of space available for cleanup

Docker Container Cleaner Advanced Features

  • Dry run mode for previewing cleanup actions without modifying the system state.
  • JSON output formatting for seamless integration with other Openclaw Skills and automation scripts.
  • Granular filtering allowing users to target only dangling images versus all unused images.
  • Force flag support for non-interactive execution in headless environments or cron jobs.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*