Skip to content

Instantly share code, notes, and snippets.

@flavienbwk
Created January 28, 2022 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flavienbwk/502d9ffdb75a62af69711642b447cd92 to your computer and use it in GitHub Desktop.
Save flavienbwk/502d9ffdb75a62af69711642b447cd92 to your computer and use it in GitHub Desktop.
Remove all Docker images of a specific name (including all its tags)

Remove all Docker images (including its different tags) :

IMAGE="sameersbn/gitlab"
docker images | grep $IMAGE | tr -s ' ' | cut -d ' ' -f 2 | xargs -I {} docker rmi $IMAGE:{}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment