Skip to content

Instantly share code, notes, and snippets.

@patrickhulce
Created October 30, 2016 16:09
Show Gist options
  • Save patrickhulce/dc0b6a3ffb19938e1bd5f0375be7611c to your computer and use it in GitHub Desktop.
Save patrickhulce/dc0b6a3ffb19938e1bd5f0375be7611c to your computer and use it in GitHub Desktop.
Docker Cleanup
docker rmi $(docker images | grep "^<none>" | awk '{print $3}') # Remove all untagged images
docker rm $(docker ps -a | grep -E '^[a-f0-9]+\s+[a-f0-9]+\s' | awk '{print $1}') # Remove all containers running untagged images
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment