docker rm all existed docker container code example
Example 1: remove all images docker
docker rmi $(docker images -a -q)
Example 2: docker remove all exited containers
docker container prune
docker rmi $(docker images -a -q)
docker container prune