Skip to content

Instantly share code, notes, and snippets.

@aUsABuisnessman
Forked from 11331133/clean-docker.sh
Created November 17, 2024 22:16
Show Gist options
  • Save aUsABuisnessman/b354582567cfdcf81ceafe117251fd57 to your computer and use it in GitHub Desktop.
Save aUsABuisnessman/b354582567cfdcf81ceafe117251fd57 to your computer and use it in GitHub Desktop.
Stop all docker processes, remove all containers, remove all images
# stop all processes
docker stop $(docker ps -aq)
# remove all containers
docker rm $(docker ps -aq)
# remove all images
docker rmi $(docker images -aq)
# delete all volumes
docker volume prune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment