How to remove old and unused Docker images

williamsmith900
New Contributor

When running Docker for a long time, there are a lot of images in the system. How can I remove all unused Docker images at once safely to free up the storage?

In addition, I also want to remove images pulled months ago, So, I'm not asking for removing untagged images only. I'm searching for a way to remove general unused images.

I checked one docker blog online, but still, I was able to get rid of this problem.

Anyone can help!