Skip to content

Instantly share code, notes, and snippets.

@hungbang
Forked from marioharper/clean-docker.sh
Created August 8, 2019 04:13
Show Gist options
  • Save hungbang/7fdcb88f3745349adf6b70f5a20d8f0e to your computer and use it in GitHub Desktop.
Save hungbang/7fdcb88f3745349adf6b70f5a20d8f0e 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
@jojojoseph11
Copy link

Thanks

@sadiq990
Copy link

sadiq990 commented Sep 4, 2022

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment