1 min readSep 8, 2020
Docker Prune images
The docker image prune
command allows you to clean up unused images. By default, docker image prune
only cleans up dangling images. A dangling image is one that is not tagged and is not referenced by any container. To remove dangling images:
$ docker image pruneWARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
To remove all images which are not used by existing containers, use the -a
flag:
$ docker image prune -aWARNING! This will remove all images without at least one container associated to them.
Are you sure you want to continue? [y/N] y