Skip to content

Instantly share code, notes, and snippets.

@doppiomacchiatto
Forked from JeffBelback/docker-destroy-all.sh
Last active May 24, 2018 20:04
Show Gist options
  • Save doppiomacchiatto/daab1d4e14fe4a22b80fc37df16e23bb to your computer and use it in GitHub Desktop.
Save doppiomacchiatto/daab1d4e14fe4a22b80fc37df16e23bb 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 -f $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment