Remove And Delete All Docker Containers

Remove And Delete All Docker Containers with the following commands:

# Stops all containers.
docker stop $(docker ps -a -q)

# Removes all containers (May take awhile depending on quantity)
docker rm $(docker ps -a -q)

However, I believe you can now accomplish this in one line.

docker rm -f $(docker ps -a -q)

Leave a Reply

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

StackOverflow Profile