docker kill $(docker ps -q) to kill all running containers
docker rm $(docker ps -a -q) to delete all stopped containers.
docker rmi $(docker images -q) to delete all images.
For fish shell, remove the $:
docker kill (docker ps -q) to kill all running containers
docker rm (docker ps -a -q) to delete all stopped containers.
docker rmi (docker images -q) to delete all images.
If you see “[command name] requires at least 1 argument”, there were no containers or images to stop or remove.
Also:
docker system prune --all