Skip to content

Instantly share code, notes, and snippets.

@PGBI
Created August 18, 2020 16:40
Show Gist options
  • Save PGBI/d4f234afec41351c61ad8404b48b918b to your computer and use it in GitHub Desktop.
Save PGBI/d4f234afec41351c61ad8404b48b918b to your computer and use it in GitHub Desktop.
[AWS CLI] Delete all network interfaces in "available" status
aws ec2 describe-network-interfaces \
--filters Name=status,Values=available \
--query "NetworkInterfaces[*].NetworkInterfaceId" \
| jq --raw-output '.[]' | xargs -I {} aws ec2 delete-network-interface --network-interface-id {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment