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

Delete all docker containers

To list all available docker images, run

Advertisement

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

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement