Skip to content

Instantly share code, notes, and snippets.

@justinclayton
Created March 6, 2015 19:50
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 justinclayton/4f600f2c31e91ffcb17b to your computer and use it in GitHub Desktop.
Save justinclayton/4f600f2c31e91ffcb17b to your computer and use it in GitHub Desktop.
Delete unattached 8GB EBS volumes
aws ec2 describe-volumes | jq -r '.Volumes[] | select((.State == "available") and (.Size == 8)) | .VolumeId' | xargs -n 1 aws ec2 delete-volume --volume-id | jq -r '.return'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment