Skip to content

Instantly share code, notes, and snippets.

@minodisk
Created April 22, 2017 01:57
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 minodisk/0633109f38755dd21b313091ee3c2380 to your computer and use it in GitHub Desktop.
Save minodisk/0633109f38755dd21b313091ee3c2380 to your computer and use it in GitHub Desktop.
#/bin/bash
images=$(gcloud beta container images list --format 'value(name)')
for i in $images; do
tags=$(gcloud beta container images list-tags $i --format 'value(tags)')
for t in $tags; do
echo delete $i:$t
gcloud beta container images delete $i:$t --resolve-tag-to-digest --quiet
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment