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

Advertisement

docker stop $(docker ps -q)

To delete all containers, run

docker rm $(docker ps -a -q)
Docker delete all containers
Add a comment

Leave a Reply

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

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement