Docker Delete all images
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
1 |
docker images |
To just display image ID only, run with -q option
1 |
docker images -q |
Now lets pass the result to docker rmi command using xargs
1 |
docker images -q | xargs docker rmi |
This will delete all images. You can also use
1 |
docker rmi $(docker images -q) |
See docker