Azure Orphaned Resources: How to Find and Remove Them Delete a virtual machine and you might assume everything it used goes with it. Often it doesn't. Managed disks, public IPs, NICs, and App Service plans are separate resources, and they can stay behind, quietly billing and cluttering your subscriptions.

The damage goes beyond cost. Stale resources blur ownership, slow audits, and leave outdated network configuration lying around. In a multi-subscription environment, nobody notices until the invoice or the audit arrives.

This guide covers how to define orphaned resources, find candidates with Azure Resource Graph and Workbooks, validate them, delete safely, and keep them from coming back.

Key Takeaways

  • Unattached does not mean safe to delete; confirm owner, dependencies, backups, and retention first.
  • Start with billable items: disks, snapshots, public IPs, load balancers, App Service plans.
  • Combine Resource Graph, Workbooks, Activity Logs, tags, and cost data for full context.
  • Run cleanup as a recurring governance process with owners and audit records.

What Azure Orphaned Resources Are

Definition and lifecycle

An orphaned resource stays provisioned after the workload, parent, or dependency it supported has been removed or stopped using it. Common causes:

  • Manual deletion of a VM or app
  • Failed or partial deployments
  • Abandoned test environments
  • Migrations
  • Incomplete Infrastructure as Code teardown

Not every VM deletion leaves leftovers. Disks and NICs follow a deleteOption of Delete or Detach, and Microsoft's VM deletion guide notes defaults differ by creation path. Portal-created OS disks default to deleting with the VM, while an existing OS disk defaults to detach.

Common examples

  • Billable: unattached managed disks, snapshots, static public IPs, empty App Service plans, load balancers with rules
  • Mostly clutter or risk: NICs without a VM, NSGs, route tables, empty resource groups

Orphaned versus underused or intentionally retained

An orphaned resource is structurally disconnected. An underused one may still serve a real workload. An intentionally retained one might support backup, disaster recovery, staging, or compliance.

Azure Site Recovery creates -ASRReplica disks that look unattached but exist for replication. Snapshots are independent read-only copies by design. Neither should be deleted just because it appears idle.

Why Orphaned Resources Matter

Direct cost and hidden waste

Billing varies by type, so check Microsoft's pricing pages rather than assuming one rate:

Resource Billing behavior
Managed disks Retained disks keep incurring charges, based on type and capacity
Snapshots Full snapshots bill on used storage; incremental on stored changes
Standard public IPv4 Static, charged regardless of association until deleted
Standard Load Balancer Metered on rules and data; no hourly charge with no rules
App Service plans Tier and instance count bill even with zero apps

Flexera's 2026 State of the Cloud report estimates 29% of IaaS and PaaS spend is wasted. That figure is not Azure-specific or limited to orphans, but it shows the size of the general problem.

Governance and operational complexity

Even free orphans hurt. They:

  • Distort inventory and break tagging coverage
  • Complicate migration planning
  • Slow down audits

A resource group full of unlabeled leftovers makes it hard to tell what is live.

Security and configuration risk

The Azure Well-Architected Framework treats public IPs as high-risk assets, while NSGs and private endpoints are protective controls. Forgotten network objects can keep outdated rules or end up attached to the wrong workload. Decommissioning also has a flip side: removing the wrong object can break critical functionality.

How to Find Azure Orphaned Resources

Establish scope and inventory

Define the subscriptions, management groups, regions, and resource types in scope. Collect resource ID, name, resource group, owner, tags, creation date, and relationship fields so each finding can be assigned.

Use Azure Resource Graph for cross-subscription discovery

Resource Graph uses a subset of KQL. Use these starting queries and verify them against the current schema documentation:

// Unattached managed disks
Resources
| where type =~ 'microsoft.compute/disks'
| where isnull(managedBy)
| where properties.diskState =~ 'Unattached'
// Public IPs with no IP configuration or NAT gateway
Resources
| where type =~ 'microsoft.network/publicipaddresses'
| where isnull(properties.ipConfiguration)
| where isnull(properties.natGateway)
// NICs with no VM or private endpoint
Resources
| where type =~ 'microsoft.network/networkinterfaces'
| where isnull(properties.virtualMachine)
| where isnull(properties.privateEndpoint)

Azure Resource Graph queries for identifying orphaned resources

Note the Reserved disk state: that disk is attached to a stopped-deallocated VM and still bills. Also, a NIC with no VM may serve a private endpoint, which is why the query checks both.

Resource Graph shows current state only. It cannot prove historical ownership, business criticality, billing impact, or intent to retain.

Use Azure Monitor Workbooks for centralized review

Microsoft maintains a Cost Optimization workbook, described in Azure Advisor documentation and built from the microsoft/finops-toolkit project. It covers unattached disks, public IPs, and idle networking resources, with subscription filters and drill-down. Its disk query excludes Site Recovery disks.

Get the workbook from the FinOps toolkit.

Validate and prioritize candidates

Cross-check each candidate against:

  • Portal relationship views and deployment records
  • Activity Log history (retained 90 days unless exported)
  • Backup and replication status
  • Tags and owner confirmation
  • Cost Management data, which lags 8-24 hours for EA/MCA and up to 72 hours for pay-as-you-go

Azure orphan validation checklist with logs backups tags and cost data

Rank by verified cost, risk, age, and confidence. Age alone is a poor signal.

How to Remove Orphaned Resources Safely

Confirm that deletion is approved

Require owner or service-team sign-off. Check for production, DR, backup, legal-retention, migration, and IaC exceptions. Log the resource ID, subscription, resource group, reason, reviewer, approval date, and any exception decision.

Protect data before deletion

Managed disk deletion is permanent, and the data cannot be recovered. Snapshot or export anything that might be needed first. A snapshot alone is not a tested recovery plan. Confirm it meets your retention and restore requirements.

Recovery rules vary by service:

  • Azure Backup soft delete: 14 days by default, extendable to 180 days
  • Key Vault soft delete: 7-90 days, default 90 days
  • App Service apps in eligible paid plans: 30 days
  • Free and Shared plan apps: not recoverable

Azure recovery windows by service and plan type

Remove dependencies in the right order

There is no universal sequence. Verify associations per resource:

  • Detach a NIC from its VM before deleting it; a VM must keep at least one NIC
  • Dissociate a public IP from its configuration before deletion
  • For a retained public load balancer, attach a replacement IP before removing the old one

Also check resource locks (CanNotDelete and ReadOnly, inherited from parents), managed identities, templates, policy assignments, and automation that might recreate the resource.

Choose a controlled deletion method

Method Notes
Portal Good for single, verified items
Azure CLI az resource delete has no dry run; --no-wait only skips waiting
PowerShell Remove-AzResource -WhatIf previews; -Force only suppresses prompts
IaC Terraform plan -destroy previews before apply

Use least-privilege RBAC, small batches, and explicit resource IDs, never wildcards. Network Contributor includes Microsoft.Network/*, which is broader than most cleanups need.

A quarantine resource group can work as a review stage. Moving a resource changes its ID and scope, but it does not stop billing or settle ownership.

Verify the cleanup

Re-run your queries, check resource group inventory, and confirm no dependents were left behind. Cost data lags, so note the expected billing timing and check the trend after the reporting period.

How to Prevent Azure Orphaned Resources from Returning

Make ownership and lifecycle visible

Tag consistently: owner, application, environment, cost center, data classification, expiration date, and recovery importance. Resource group tags are not inherited automatically, so enforce them with Azure Policy:

  • Require a tag on resources: deny effect
  • Inherit a tag from the resource group: modify effect (run a remediation task for existing resources)

Allow documented exceptions for platform, security, and DR resources.

Automate cleanup at the source

Deployment stacks in Bicep control what happens when resources leave the stack via --action-on-unmanage: deleteAll, deleteResources, or detachAll. Terraform handles teardown through its own plan and destroy flow. For test environments, Azure DevTest Labs supports an expiration date, separate from autoshutdown.

Build warning notifications and approval checkpoints into expiration workflows. Don't rely on someone remembering.

Schedule recurring discovery and review

Run a Resource Graph or Workbook review on a fixed cadence. Report new candidates, verified cost, owner, age, exception status, and remediation progress. The FinOps Foundation's Usage Optimization capability explicitly includes removing stranded storage and excess snapshots.

For enterprises with large block-storage estates, Lucidity's Lumen offers continuous visibility on top of native tools. It identifies four idle-disk types (unattached, reserved, unmounted, and zero-I/O) that can represent up to 70% of unused block-storage spend.

Lumen supports Azure, AWS, and Google Cloud. In one example breakdown, Site Recovery replicas alone accounted for $29.8K annually. Ownership validation and deletion governance still belong to your team.

Measure and improve the process

Track findings by type, owner, age, cost, exception reason, and time to remediation. Use the data to tighten tags, pipelines, and policies. Not every inactive resource is waste.

Frequently Asked Questions

What are orphaned resources in Azure?

Resources that remain after the workload or parent that used them was deleted or stopped using them. Typical examples are unattached disks, unused public IPs, and NICs.

Can you recover deleted resources in Azure?

It depends on the service, backups, soft-delete settings, and retention. Some deletions, such as managed disks, are permanent.

Can you move resources between resource groups in Azure?

Many supported types can move, subject to dependency, subscription, and policy limits. Moving does not delete a resource or stop billing.

How do I find orphaned resources in Azure?

Use Resource Graph, Workbooks, portal relationships, tags, Activity Logs, and Cost Management together. Every finding needs human validation.

Which Azure resources are commonly orphaned?

Unattached disks, snapshots, public IPs, NICs, App Service plans, load balancers, route tables, NSGs, and empty resource groups. Billing differs by type.

How do I safely delete an orphaned managed disk in Azure?

Confirm the owner, check workload and backup links, decide on a snapshot, check locks, delete with the explicit resource ID, and re-run your queries afterward.