Docker

Stop / remove all Docker containers

$ docker stop $(docker ps -a -q)
$ docker rm $(docker ps -a -q)
  1. List containers with docker ps. The argument -a/--all include also the stopped ones and -q/--quiet displays only the numeric IDs.
  2. Use docker stop and docker rm with the output of the first command (bash command substitution).

References: