I need to delete a resource group and I can't. I've already tried several ways.

Suzana Maciel 0 Reputation points
2025-11-18T20:23:34.5066667+00:00

I need to delete a resource group and I can't. I've already tried several ways.

It's costing the organization money because it's not being used and I haven't been able to delete it successfully.

Azure Resource Mover
Azure Resource Mover
An Azure service used for moving multiple resources between Azure regions.
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-11-18T20:23:58.8033333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To delete a resource group in Azure, you can use several methods. Here are the steps for each method:

    Azure Portal

    1. Sign in to the Azure portal.
    2. In the search box, type the name of your resource group and select it.
    3. In the resource group overview, select Delete resource group from the toolbar.
    4. Confirm the deletion by typing the name of the resource group when prompted.

    Azure CLI

    You can also delete a resource group using the Azure CLI with the following command:

    az group delete --name YourResourceGroupName
    

    PowerShell

    If you prefer PowerShell, you can use this command:

    Remove-AzResourceGroup -Name YourResourceGroupName
    

    Important Note

    Ensure that the resource group is empty before attempting to delete it. If it contains resources, you will need to delete those resources first. If you are still having issues, check if there are any locks on the resource group that might prevent deletion.

    If you have already tried these methods and are still unable to delete the resource group, please provide more details about the errors or issues you are encountering.


    References:

    0 comments No comments

  2. Sandhya Kommineni 2,895 Reputation points Microsoft External Staff Moderator
    2025-11-19T02:56:05.2666667+00:00

    Hi Suzana Maciel,

    Thanks for posting your question in Microsoft Q&A forum

    Could you please provide the specific error message you encounter when attempting to delete the resource group?

    If you can't delete a resource group in Azure despite several attempts, this is often due to issues like resource locks, dependencies, or permission restrictions that block the deletion process

    • To delete a resource group, you must first remove any underlying resource locks and backup data.
    • To delete a resource group, you need access to the delete action for the Microsoft.Resources/subscriptions/resourceGroups resource.
    • Resource Dependencies some resources may depend on others (e.g., virtual networks with active subnets), causing circular dependency errors. Disassociate or delete those dependencies first.
    • For a list of operations, see Azure resource provider operations. For a list of built-in roles, see Azure built-in roles. If you have the required access, but the delete request fails, it might be because there's a lock on the resources or resource group. Even if you didn't manually lock a resource group, a related service might automatically lock it. Or, the deletion can fail if the resources are connected to resources in other resource groups that aren't being deleted. For example, you can't delete a virtual network with subnets that a virtual machine uses.
    • Some deployment stacks or managed resources may persist, or Azure may retain references even after deletion attempts. Review the deployment stacks and resource explorer for leftovers

    Use below commands from the MS official document to delete resources and resources group

    https://dori-uw-1.kuma-moon.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell

    I hope the provided answer is helpful, do let me know if you have any further questions on this Please accept as Yes if the answer is helpful so that it can help others in the community.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.