Low Orbit Flux Logo 2 F

Docker How To Remove Or Delete Images

It is easy to remove or delete docker images.

This command will delete an image named my-image1:


docker rmi my-image1

Delete an image by ID:


docker image remove 113a43faa138

Find and list all images like this:


docker images -a

Delete all images like this:


docker rmi $(docker images -a -q)

You can find unused or dangling images with this command:


docker images -f dangling=true

You can remove all dangling images like this:


docker image prune

Remove all images that aren’t referenced by a container like this:


docker image prune -a

Here is a quick table with useful commands that can be used to remove images.

docker images show images
docker image rm user1/funny-frog remove image
docker image remove 113a43faa138 remove by id
docker image remove user1/funny-frog remove image
docker rmi user1/funny-frog remove image
docker rmi $(docker images -q) remove all images