Skip to content

Instantly share code, notes, and snippets.

@kurobeats
Forked from dguardia/docker-destroy-all.sh
Created April 9, 2017 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kurobeats/92d7656445512ff6fd104f352328c0ed to your computer and use it in GitHub Desktop.
Save kurobeats/92d7656445512ff6fd104f352328c0ed to your computer and use it in GitHub Desktop.
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images BY FORCE
docker rmi -f $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment