Docker Tricks to Remove All Images



This short tutorial teaches you how to remove all images in Docker.

1. Docker Remove All Images

Are you sure you want to remove all images? If so, first, all images and containers should be removed from your machine after running the two command lines below:

# delete ALL containers
$ docker rm -f $(docker ps -a -q)

# and then delete ALL images
$ docker rmi $(docker images -q) --force

More Resources

Here are two of my favorite Docker Books if you want to learn more about them.

Related Posts