DEV Community

Discussion on: How to remove all docker containers in a network

Collapse
 
hasnayeen profile image
Nehal Hasnayeen

you can use this command to remove all containers in a network

docker rm $(docker ps -q -f "network=<NAME>")
Enter fullscreen mode Exit fullscreen mode
Collapse
 
jtsalva profile image
Tim Salva

Thanks @hasnayeen , time for me to switch to using this.