A simple utility to make it easier to cleanup Docker images and containers.
dockerclean [OPTIONS]
-c PATTERN
: Remove all containers matched byPATTERN
-d
: Remove all images tagged as<none>
-e
: Remove all exited containers-r
: By defaultdockerclean
executes indry-run
mode to give you a chance to preview any images or containers that will get deleted. Use the-r
flag to remove matched images and containers.-i PATTERN
: Remove all images matched byPATTERN
-h
: Print usage and options
If -e
and -c
are used in conjunction, dockerclean
will find all containers
that have exited or match the PATTERN
provided.