Before you can delete a docker image, you need to delete any container that is based on this image. So see how to delete all docker containers, see
To list all available docker images, run
docker images
To just display image ID only, run with -q option
docker images -q
Now lets pass the result to docker rmi command using xargs
docker images -q | xargs docker rmi
This will delete all images. You can also use
docker rmi $(docker images -q)
See docker
Leave a Reply