Deleting all resources, created in one Resource Group in #Azure

When you deploy a big system with a hand full or even more of resources in Azure, and put them all in one resource group, you have a lot of…

Deleting all resources, created in one Resource Group in #Azure

When you deploy a big system with a hand full or even more of resources in Azure, and put them all in one resource group, you have a lot of power to manage and control all those resources as a group.

Recently, I deployed an Ethereum Consortium Blockchain network in my Azure subscription, but I don’t need it for now, so I wanted to clean my subscription a bit as it deployed 21 various resources in my subscription.

Since this template creates all the resources in 1 Resource Group I can delete them all together by simply just deleting the Resource Group.

Delete Resource Group from Azure Portal

First option is to open the Azure portal, select the Resource Groups menu, select the Resource Group you want to delete and select the “Delete” menu:

As you see in the picture above, there are 21 items in this resource group and it would have been a nightmare to delete them one by one, so using Resource Groups comes to rescue here.

Delete Resource Group using Azure Powershell

The other option is to use Azure Powershell.

You can simply call the following command to delete the Resource Group and all the resources in it:

Remove-AzureRmResourceGroup -Name EthereumAram

If you want to delete a specific resource from a Resource Group you can use the following Powershell command:

Remove-AzureRmResource -ResourceName mystoragename -ResourceType Microsoft.Storage/storageAccounts -ResourceGroupName EthereumAram

Using Resource Groups have other benefits too, but I would try to utilize them just for this purpose.