Skip to content

Instantly share code, notes, and snippets.

@Selimcse98
Forked from pahud/delete_all_awslogs.sh.md
Created November 20, 2020 01:53
Show Gist options
  • Select an option

  • Save Selimcse98/94bae73b25250af0f9ab8bf5c5895e9f to your computer and use it in GitHub Desktop.

Select an option

Save Selimcse98/94bae73b25250af0f9ab8bf5c5895e9f 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