Created
September 7, 2019 15:04
-
-
Save k3karthic/1c96261f0d4e474d911ef38046624262 to your computer and use it in GitHub Desktop.
Remove all docker containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
docker ps -a | awk '{ print $1 }' | grep -v 'CONTAINER' | xargs -I{} docker stop {} | |
docker ps -a | awk '{ print $1 }' | grep -v 'CONTAINER' | xargs -I{} docker rm {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment