Skip to content

Instantly share code, notes, and snippets.

@evzpav
Created September 30, 2019 14:06
Show Gist options
  • Save evzpav/a9715c78d8c842f6d53537f141f3c02b to your computer and use it in GitHub Desktop.
Save evzpav/a9715c78d8c842f6d53537f141f3c02b to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "-- STOPPING CONTAINERS"
docker stop $(docker ps -q)
echo "-- REMOVING CONTAINERS"
docker rm $(docker ps -q)
docker rm $(docker ps -a -q)
echo "-- REMOVING IMAGES"
docker rmi $(docker images -q)
echo "-- NETWORK PRUNE"
docker network prune -f
echo "-- SYSTEM PRUNE"
docker system prune -f
echo "done clean docker"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment