Delete all Docker images

You can do this by executing the following command.

docker rmi -f $(docker images -aq)

First, you can delete image withdocker rmi <image ID>. An example is shown below.

docker rmi e035f93e2af9

However, there is a image that does not disappear occasionally with this, so add the -f option and forcibly delete it.

docker rmi -f e035f93e2af9

The following is a command to display all image IDs.

docker images -aq

You can also display the hidden image ID with the -a option. Only the ID of image can be displayed with the -q option.

Combining these, you can remove all images with the following command, as shown at the beginning.

docker rmi -f $(docker images -aq)

Recommended Posts

Delete all Docker images
One liner to delete all Docker images
Docker all containers, images (stopped, deleted)
Delete unused docker image
Command to stop or delete all Docker resources
docker error delete command
How to delete untagged images in bulk with Docker
Add, replace, delete Java PDF images
docker
Until Docker beginners create Docker images from Dockerfile
[AWS ECR] Save and get Docker images
Let's finally use Docker: Terms, Images, Launch
[Docker] Start container, start bash in container, delete image
Post / delete multiple images with Active Storage