Skip to content

Instantly share code, notes, and snippets.

@prezire
Last active November 4, 2022 14:32
Show Gist options
  • Save prezire/3789fab631ca5eeedd6646ee269117dd to your computer and use it in GitHub Desktop.
Save prezire/3789fab631ca5eeedd6646ee269117dd to your computer and use it in GitHub Desktop.
Docker commands
Ref:
https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes
Remove all:
docker system prune -a
Images:
Remove all:
docker rmi $(docker images -a -q)
Containers:
Stop and remove:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
Remove all stopped containers:
docker container rm $(docker container ls -aq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment