Skip to content

Instantly share code, notes, and snippets.

@JanPetr
Created November 14, 2016 12:21
Show Gist options
  • Save JanPetr/8a4eaecf81132d4baf85e51182c5c698 to your computer and use it in GitHub Desktop.
Save JanPetr/8a4eaecf81132d4baf85e51182c5c698 to your computer and use it in GitHub Desktop.
Clear docker
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Remove all containers
docker rm $(docker ps -a -q)
# Remove all images
docker rmi $(docker images -q)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment