To remove all stopped containers: docker ps --filter "status=exited" --format "{{.ID}}" | foreach { docker rm $_ }