Clear Docker of containers and images permalink
In order to stop all running Docker containers, delete them, and remove their images, run the following command:
docker stop $(docker ps -a -q) &&
docker rm $(docker ps -a -q) &&
docker rmi $(docker images -q)
WARNING: This will delete everything and you cannot recover it!