Skip to content

Instantly share code, notes, and snippets.

@ping-localhost
Forked from beeman/remove-all-from-docker.sh
Last active January 2, 2020 13:11
Show Gist options
  • Select an option

  • Save ping-localhost/79e06717ca550d5b8303374f112e26ab to your computer and use it in GitHub Desktop.

Select an option

Save ping-localhost/79e06717ca550d5b8303374f112e26ab to your computer and use it in GitHub Desktop.
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
docker volume rm $(docker volume ls -qf dangling="true")
# Remove all networks
docker network rm `docker network ls -q`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment