Delete all docker containers

We need to use diff commands to to do this. First lets get list of all containers.

docker ps -a -q

This will list all docker containers available. Before we can delete, we need to stop them.

To stop all running containers, use

docker stop $(docker ps -q)

To delete all containers, run

docker rm $(docker ps -a -q)

Docker delete all containers

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *