Posts Tagged with "docker"

Delete all Docker containers and images

Posted by Stanislav Furman on September 9, 2016

First time I heard about Docker was beginning of 2016. Finally, I got a chance to try Docker in "wild nature".

One of the most common things you might need from time to time is to stop or remove all your Docker images in one shot. Here are some simple and useful commands to stop or remove all of Docker containers.

Before deleting Docker containers we need stop them:


$ docker stop $(docker ps -a -q)

Now, when our Docker containers are not running, we can delete them:


$ docker rm $(docker ps -a -q)

Also there is a nice untility to clean your Docker images, volumes and networks. It's called Docker Clean.