Deleting a virtual machine in Azure does not always delete everything attached to it. Managed disks, network interfaces, and public IP addresses can be left behind, and they keep billing every month whether or not anything uses them. Over a year across a busy subscription, these orphans quietly add up. This is exactly the pain behind the long-running, heavily-voted "delete a VM with all its associated resources" request on the Azure feedback forum.
What counts as an orphaned resource
- Unattached managed disks. A disk whose owner VM is gone still bills for its provisioned size and tier.
- Unassociated public IP addresses. A standard public IP with nothing attached bills hourly.
- Orphaned network interfaces (NICs). Usually free on their own, but they clutter the estate and block clean deletes.
- Empty App Service plans. A plan with no apps still charges for its tier.
- Old snapshots and unused load balancers or gateways in the same vein.
The DIY approach: Resource Graph queries
Azure Resource Graph is the fastest way to find these across every subscription at once. A couple of starting points:
Unattached managed disks:
resources | where type =~ 'microsoft.compute/disks' | where properties.diskState == 'Unattached'
Public IPs with nothing associated:
resources | where type =~ 'microsoft.network/publicipaddresses' | where isnull(properties.ipConfiguration)
Azure Advisor also surfaces some idle and unattached resources under its cost recommendations, and the portal now cleans up disks and NICs at VM-delete time if you opt in. But none of this gives you a standing, all-up report of what is still billing after the fact, with an estimate of the monthly cost, which is what you actually want for a recurring FinOps review.
A ready-made option: Orphan Cleanup
Orphan Cleanup runs a daily scan and lists every unattached disk, unassociated public IP, orphaned
NIC, and empty App Service plan, each with its estimated monthly cost, so you get a standing report
of what is still costing you after a delete. It is read-only by default, and any resource you tag
orphan-cleanup-exempt=true is never touched. It runs entirely in your own subscription
under a managed identity you control.
Key facts
- Deleting a VM can leave disks, NICs, and public IPs behind that keep billing.
- Find them with Azure Resource Graph queries or Azure Advisor.
- Biggest cost drivers: unattached premium disks and empty App Service plans.
- Clean up safely: review a report first, exclude anything intentional.
Related reading: how to put a hard spending cap on Azure.
Written by the team at Katabarwa Labs. We build small, single-purpose Azure tools that run entirely inside your own tenant. Questions: abaho@llmgraph.ai.