The Nuclear Option
Remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes.
docker system prune -a --volumes
Remove stopped containers
docker container prune
Remove dangling images
Images that are not tagged and not used by any container.
docker image prune
Kill all running containers
docker kill $(docker ps -q)
Remove all containers
docker rm $(docker ps -a -q)