whatisgithub

What is docker-cleanup?

wurstmeister/docker-cleanup — explained in plain English

Analysis updated 2026-07-25 · repo last pushed 2016-02-03

4ShellAudience · ops devopsComplexity · 2/5DormantSetup · easy

In one sentence

Docker Cleanup is a tool that automatically deletes stopped containers and unused images on a schedule so your server's disk doesn't fill up with leftover clutter.

Mindmap

mindmap
  root((repo))
    What it does
      Removes stopped containers
      Deletes unused images
      Runs on a schedule
    Tech stack
      Shell
      Docker
      Systemd
    Use cases
      Build server cleanup
      Cluster node maintenance
      Free up disk space
    Config options
      Cleanup interval
      Deletion delay
      Protect specific images
    Deployment
      Command line
      Systemd service
      Puppet

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically clear old containers and images on a Jenkins build server to prevent disk exhaustion.

USE CASE 2

Keep a cluster node tidy by removing stopped containers and unused images on a recurring schedule.

USE CASE 3

Run a one-time cleanup pass to reclaim disk space from orphaned containers and images.

USE CASE 4

Protect critical images from deletion while cleaning up everything else on a shared server.

What is it built with?

ShellDocker

How does it compare?

wurstmeister/docker-cleanupappleaa123/fable_osjayvig79/plex-preroll-automation
Stars444
LanguageShellShellShell
Last pushed2016-02-03
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity2/53/52/5
Audienceops devopsdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

No gotchas, just run the provided Docker container with environment variables to configure cleanup behavior.

No license information is provided in the repository, so default copyright restrictions apply and usage rights are unclear.

So what is it?

This project, called Docker Cleanup, automatically frees up disk space on servers by removing old containers and images that are no longer being used. When software containers stop running, they typically linger on disk and accumulate over time. This tool runs on a schedule and clears out that clutter so your servers don't run out of storage. The way it works is straightforward: it runs as a container itself and periodically checks for stopped containers and unused images, removing them after a configurable delay (30 minutes by default). You can adjust how often it cleans up, how long it waits before deleting things, and whether certain images should be protected from deletion. It can also clean up orphaned data volumes if given access to the right directory. By default it runs in a continuous loop, but you can set it to run once and stop. The people who benefit most from this are teams running lots of containers on a single machine, for example, a build server that continuously creates and destroys containers for testing, or a cluster node where many services start and stop throughout the day. Without something like this, leftover containers and outdated image versions gradually fill the disk, which can eventually cause failures or require manual intervention. A Jenkins build server is a concrete example: it rebuilds images frequently, leaving behind untagged versions that pile up over time. Deployment options include running it directly from the command line, or setting it up as a system service that starts automatically and restarts on failure. The README provides configuration examples for systemd-based setups (including CoreOS clusters) and Puppet. Not much else is documented beyond these deployment patterns and the environment variable settings, so users looking for deeper customization or troubleshooting guidance may need to explore the source code.

Copy-paste prompts

Prompt 1
Help me deploy the Docker Cleanup container with a 1-hour cleanup interval and a 15-minute deletion delay, and show me the docker run command with the right environment variables.
Prompt 2
Generate a systemd service file for the Docker Cleanup container that restarts on failure and starts automatically on boot.
Prompt 3
Set up Docker Cleanup to protect my production images tagged 'latest' and 'stable' from being deleted while cleaning up everything else.
Prompt 4
Write a one-shot Docker Cleanup command that runs once, removes orphaned volumes, and then exits immediately.
Prompt 5
Explain how to deploy Docker Cleanup on a CoreOS cluster using systemd unit files with fleet.

Frequently asked questions

What is docker-cleanup?

Docker Cleanup is a tool that automatically deletes stopped containers and unused images on a schedule so your server's disk doesn't fill up with leftover clutter.

What language is docker-cleanup written in?

Mainly Shell. The stack also includes Shell, Docker.

Is docker-cleanup actively maintained?

Dormant — no commits in 2+ years (last push 2016-02-03).

What license does docker-cleanup use?

No license information is provided in the repository, so default copyright restrictions apply and usage rights are unclear.

How hard is docker-cleanup to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is docker-cleanup for?

Mainly ops devops.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.