Deleting all resource groups with a prefix in their name in Azure

One benefit of using a prefix in Azure resource group names is being able to easily remove all resource groups starting with that prefix with a one liner (be very careful with “-y” though):

az group list -o table | grep '^yourprefix' | awk '{system("az group delete -y --no-wait -g "$1)}'

This is of course not limited to resource group names. You can use the same approach for pretty much everything in Azure.