When building and running Docker images for development and testing, we end up with many unused imaged that take up a lot of space.

This post will show how to use the Docker CLI to remove unused Docker images (also known as dangling) and reclaim a lot of space.

Docker Prune

In my case, before running the prune command, I have more than 40 unused images. To remove dangling and unused images, we run the following command.

docker image prune

Below you can see how many images were removed from my host.


Posted

in

by