How to stop and remove all Docker containers easily

OK, I was playing with Docker and I ended up creating a lot of containers running on my machine and now I want to remove all at once, how do I do it? Simple, just run the two following command lines:

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

Posted

in

by

Tags: