Skip to content

Instantly share code, notes, and snippets.

@lrakai
Forked from pahud/delete_all_awslogs.sh.md
Created January 18, 2019 22:26
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 lrakai/f56f733f30f317e8f2e8755f0987b4f1 to your computer and use it in GitHub Desktop.
Save lrakai/f56f733f30f317e8f2e8755f0987b4f1 to your computer and use it in GitHub Desktop.
delete all aws log groups
aws logs describe-log-groups --query 'logGroups[*].logGroupName' --output table | awk '{print $2}' | grep -v ^$ | while read x; do aws logs delete-log-group --log-group-name $x; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment