Skip to content

Instantly share code, notes, and snippets.

@scottw
Created May 26, 2016 14:39
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottw/9ad2637cfab67c16f5018559d97e20fb to your computer and use it in GitHub Desktop.
Save scottw/9ad2637cfab67c16f5018559d97e20fb to your computer and use it in GitHub Desktop.
Purges unreachable Docker image layers. Add to ~/.bash_profile, run as needed.
docker-image-purge() {
docker images -q -f dangling=true | xargs docker rmi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment