Sep 14, 2018

How to stop / remove all docker containers

To stop:
$ docker stop $(docker ps -a -q)
Or $ docker container stop $( docker container ls)
To remove
$ docker rm $(docker ps -a -q)
Or $ docker container rm $(docker container ls -a -q)
You can combine a lot of shell commands in a Docker context.

See also:

You can use docker info to get system-wide information.