Skip to content

Instantly share code, notes, and snippets.

@nandotorres
Created May 30, 2017 14:47
Show Gist options
  • Save nandotorres/5668d702f0d06c6b4fed90771545bda8 to your computer and use it in GitHub Desktop.
Save nandotorres/5668d702f0d06c6b4fed90771545bda8 to your computer and use it in GitHub Desktop.
myrepo=my_repo_name
aws ecr list-images --repository-name $myrepo --query 'imageIds[?type(imageTag)!=`string`].[imageDigest]' --output text | while read line; do aws ecr batch-delete-image --repository-name $myrepo --image-ids imageDigest=$line; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment