Skip to content

Instantly share code, notes, and snippets.

@agsdot
Forked from JeffBelback/docker-destroy-all.sh
Created June 8, 2017 23:57
Show Gist options
  • Save agsdot/0d324f04bfdf11eff2bc4c50a257d6c6 to your computer and use it in GitHub Desktop.
Save agsdot/0d324f04bfdf11eff2bc4c50a257d6c6 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
docker rmi $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment