0
 $ docker ps -a -f network=$NETWORK --format='{{.ID}}' | xargs docker rm -f

Aug. 17, 2018, 4:38 p.m.gatero

Explanation

docker ps -a -f network=$NETWORK --format='{{.ID}}' returns the id's of all container that are subscribed to the network and pass the output to xargs docker rm -f that stop and deletes each container