Share via

resource group in Deleting state for long time

Vladimir Tsitovtsev 30 Reputation points
2026-03-27T16:47:31.0133333+00:00

my resource group in Deleting state for long time
how can I debug?

Azure Automation
Azure Automation

An Azure service that is used to automate, configure, and install updates across hybrid environments.


Answer accepted by question author
  1. Suchitra Suregaunkar 11,150 Reputation points Microsoft External Staff Moderator
    2026-03-27T19:36:55.8766667+00:00

    Hello Vladimir Tsitovtsev

    When you delete a resource group, Azure Resource Manager (ARM) deletes resources asynchronously and in dependency order. If any single resource delete keeps retrying or is blocked, the entire RG stays in Deleting.

    1. Check Activity Log at the resource group scope (most important):

    This tells you exactly which resource is blocking deletion.

    In Azure Portal

    • Go to the Resource Group
    • Select Activity log
    • Filter:
    • Operation = Delete resource or Delete resource group
      • Status = Failed

    Look for:

    • Failed delete operations
    • Error codes like Conflict, AnotherOperationInProgress, AuthorizationFailed
    • This is the authoritative source for the blocker.

    Reference: https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/delete-resource-group?tabs=azure-powershell

    1. List remaining / “ghost” resources with CLI:

    Even if the portal shows nothing, resources may still exist logically.

    az resource list --resource-group <rg-name> -o table
    

    If any resource is returned, that resource must be deleted first.

    1. Check for resource locks: Deletion fails silently if a lock exists.
    az lock list --resource-group <rg-name>
    

    If found, remove it:

    az lock delete --ids <lock-id>
    

    Azure requires all locks be removed before RG deletion

    1. Look for known hard blockers: When troubleshooting long-running delete operations, check for known hard blockers. Common resources that often cause these issues include Application Gateway or Load Balancer with backend references that haven't been detached, Virtual Machines or VM Scale Sets with disks, NICs, or public IPs still attached, Key Vaults with soft-delete or purge protection enabled, and Private Endpoints where the DNS zone or link still exists.

    Azure retries delete calls for 15 minutes per resource, after which it can get stuck indefinitely if retries keep failing.

    1. Check for managedBy resources: Some resources are owned by another service (AKS, ML Workspace, Dev Center environments).
    az resource list --resource-group <rg-name> --query "[?managedBy!=null]"
    

    If present, you must delete the parent service, not the resource directly.

    1. Retry deletion after removing blockers:
    az group delete --name <rg-name> --yes --no-wait
    

    This does not force delete — it only works once blockers are gone.

    Thanks,

    Suchitra.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Vladimir Tsitovtsev 30 Reputation points
    2026-03-30T15:29:05.06+00:00

    Hi Bharath Y P the issue is resolved, thank you for your attention. Regards, Vladimir

    0 comments No comments

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.