Skip to content

Instantly share code, notes, and snippets.

@aztecrex
Created May 13, 2016 22: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 aztecrex/cbbb9d597a84b2ceeec73887dc768e49 to your computer and use it in GitHub Desktop.
Save aztecrex/cbbb9d597a84b2ceeec73887dc768e49 to your computer and use it in GitHub Desktop.
delete tagless images from ECR
this is not quite it...
aws ecr list-images --repository-name MyRepository --query 'imageIds?type(imageTag)!=`string`.imageDigest' --output text | while read line; do aws ecr batch-delete-image --repository-name MyRepository --image-ids imageDigest=$line; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment