Blog Archive

Sunday, 9 August 2015

How to clear all the Docker containers from a single command.?

The following line of command help you clear the all the docker containers including currently running and also which are  in the exited status too

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


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

No comments:

Post a Comment