Docker : Remove all images

by Sebastien le gall, at 11 June 2016, category : Docker

If you have ever add to work with docker and and docker-compose, you probably often have mistaken in you Dockerfile. Specially when you work with multiple container build from multiple Dockerfile and tag differently.

Here is a simple way to clean all your docker images.

Show images : {% highlight sh %} $ docker images {% endhighlight %}

Delete all container : {% highlight sh %} $ docker rm $(docker ps -a -q) {% endhighlight %}

Delete all images : {% highlight sh %} docker rmi $(docker images -q) {% endhighlight %}

comments powered by Disqus