Skip to content

Instantly share code, notes, and snippets.

@lukepearson
Last active July 17, 2018 14:06
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 lukepearson/280025d1d7695f4f0c656ce490f49291 to your computer and use it in GitHub Desktop.
Save lukepearson/280025d1d7695f4f0c656ce490f49291 to your computer and use it in GitHub Desktop.
Nuke docker. Destroy all image, volumes
#!/bin/bash
docker stop `docker ps -q`
docker rm `docker ps -aq`
docker rmi `docker images -q` -f
docker rmi `docker images -q` -f # because it doesnt always work the first time
y | docker system prune
y | docker image prune
y | docker volume prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment