Skip to content

Instantly share code, notes, and snippets.

@andi1984
Last active September 30, 2020 17:48
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 andi1984/b7322c213580404e58daf6f86ffd1f25 to your computer and use it in GitHub Desktop.
Save andi1984/b7322c213580404e58daf6f86ffd1f25 to your computer and use it in GitHub Desktop.
#!/bin/bash# Delete all containersdocker
rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)# Prune unused volumesdocker volume prune
# Stop containers forever
docker stop $(docker ps -a -q) &docker update --restart=no $(docker ps -a -q) &systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment