Skip to content

Instantly share code, notes, and snippets.

@BoxedBrain
Created June 5, 2020 09:09
Show Gist options
  • Save BoxedBrain/53e4176117b8b23bd769b42481eb25e2 to your computer and use it in GitHub Desktop.
Save BoxedBrain/53e4176117b8b23bd769b42481eb25e2 to your computer and use it in GitHub Desktop.
Docker cleanup cheatsheet

Docker cleanup cheatsheet

Delete all existing containers:

sudo docker rm -f $(docker ps -a -q)

Delete all stopped containers:

sudo docker rm -f $(docker ps -a -f status=exited)

Delete all unused items:

sudo docker system prune --all --volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment