This will list all Docker containers, and delete each one regardless of whether it’s running or not. Good if you use Docker for dev containers and need to reset your state.

docker ps -a --format '{{.ID}}' | xargs -I{} docker rm -v {}

Another way to do this (thanks to @sonicrocketman):

docker ps -aq | xargs -I{} docker rm -vf {}