Skip to content

Instantly share code, notes, and snippets.

@scotthaleen
Last active September 8, 2021 07:13
Show Gist options
  • Save scotthaleen/ce55864cfc61fb4490fc9452048a9d23 to your computer and use it in GitHub Desktop.
Save scotthaleen/ce55864cfc61fb4490fc9452048a9d23 to your computer and use it in GitHub Desktop.
docker kill all
#stop all containers:
docker kill $(docker ps -q)
#remove all containers
docker rm $(docker ps -a -q)
#remove all docker images
docker rmi $(docker images -q)
#remove intermediate containers, use "build --rm" to avoid them
docker rmi $(docker images -f "dangling=true" -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment