docker rm exited containers code example
Example 1: remove all images docker
docker rmi $(docker images -a -q)
Example 2: docker remove all exited containers
docker container prune
Example 3: remove docker images
docker system prune -a
Example 4: docker remove exited containers
(docker ps -a |findstr Exited) | foreach-object {docker rm $_.split(" ")[-1]}