Docker Index Page 1

Docker: how to delete all containers or images

Check here how to remove all containes with one line command :docker rm $(docker ps -aq). This is useful when you use docker in dev environments and you forgot to delete non-used containers.

Docker Index Page 1

How to stop or remove all Docker containers with one command?

Use docker stop $(docker ps -a -q) to stop all containers. If oyu want to remove them jsut use "rm" instead of "stop". Check here to understand how the command works.