Delete Multiple Docker Containers

As part of my Docker coverage series and Yesterday’s post about connecting to a running Container, this post will show you how to delete multiple Containers using Docker.

If you haven’t created a Container Host yet, visit the Container Hosts page and setup one.

To delete all containers first run the command below which will stop all Containers.

docker stop $(docker ps -a -q)

Next run the command below to delete all stopped Containers.

docker rm $(docker ps -a -q)

Leave a Reply