Skip to content

Instantly share code, notes, and snippets.

@martinheidegger
Created August 29, 2014 02:24
Show Gist options
  • Save martinheidegger/4fe7ea8673b36512f672 to your computer and use it in GitHub Desktop.
Save martinheidegger/4fe7ea8673b36512f672 to your computer and use it in GitHub Desktop.
Small tool to remove all the docker images and containers that you once created and forgot about (I added this to ~/.zshrc)
#!/bin/bash
docker-gc() {
docker rm `docker ps -a -q`
docker rmi `docker images -q -f="dangling=true"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment