registry-cleaner

The confirm.tools library provides a registry-cleaner CLI script to cleanup a Docker registry.

usage: registry-cleaner [-h] [-d] [-n] [-r [REPOS ...]] host

A tool to clean old images of a Docker registry.

positional arguments:
 host                  the Docker registry host

optional arguments:
 -h, --help            show this help message and exit
 -d, --debug           enable debug logging
 -n, --dry-run         do not delete anything
 -r [REPOS ...], --repos [REPOS ...]
                       the name of a repository

Important

Please also read the confirm.tools.registry.RegistryCleaner.cleanup_aliases() regarding the garbage collection.