Skip to content

Instantly share code, notes, and snippets.

@kmcquade
Created April 23, 2021 20:35
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 kmcquade/d48a30d6bd2afa8ceffaa4ef60d16b96 to your computer and use it in GitHub Desktop.
Save kmcquade/d48a30d6bd2afa8ceffaa4ef60d16b96 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
for sub in `az account list | jq -r '.[].id'`; do \
for rg in `az group list --subscription $sub | jq -r '.[].name'`; do \
az group delete --name ${rg} --subscription $sub --no-wait --yes; \
done; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment