> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Disks of Stopped Azure VMs

> Snapshot and delete the managed disks of Azure VMs that have not run for at least 14 days.

A deallocated Azure VM stops billing for compute, but its managed disks keep billing for their full size. VMs that are stopped "for now" are often never started again. nOps finds disks named after a VM that has had no billed usage for two weeks, and estimates the saving from deleting them, after a snapshot if the data might be needed.

| | |
| - | - |
| **Cloud** | Microsoft Azure |
| **Category** | Storage |
| **Service** | Managed Disks |
| **Action** | Delete |
| **Effort** | Low |
| **Restart needed** | No |
| **Can be rolled back** | No |
| **Analysis window** | Last 14 days |
| **Source** | nOps |

## Why it matters

Premium SSD disks of stopped VMs can cost more than the VM did, and they are easy to miss because the VM looks switched off.

## How nOps finds it

nOps reads your Azure VM billing. Billing does not link disks to VMs, so nOps uses Azure's default disk names (the VM name followed by \_OsDisk or \_DataDisk) in the same subscription and resource group. Disks are flagged when they were billed on every one of the last 14 complete days while the VM they are named after had no billed usage at all. Disks with custom names are not checked. The saving is what the disks cost in the last 7 days, net of discounts and scaled to a month, and must be at least \$2 a month.

## Before you start

Confirmation from the VM owner that it will not be started again, and permission to snapshot and delete disks.

## How to implement

1. Ask the VM owner whether the VM will be started again. Some stopped VMs are restarted within a month.
2. If the data might be needed later, take a snapshot of each disk (**Disk → Create snapshot**, or `az snapshot create --resource-group MY_RG --name MY_SNAPSHOT --source DISK_ID --incremental true`).
3. Delete the VM and its disks together, or delete only the disks (`az disk delete --resource-group MY_RG --name MY_DISK`).
4. Remove the VM from Terraform, Bicep or ARM templates if it is defined there.

## Risks and considerations

* Deleting a disk is permanent. Take a snapshot first if there is any chance the data is needed.
* A VM whose OS disk is deleted cannot be started again. You would recreate it from a snapshot.
* Snapshots cost much less than disks, but they still cost something. Delete them when they are no longer needed.

## FAQs

> [accordion] Why are some disks of stopped VMs not flagged?
>
> nOps matches disks to VMs by Azure's default disk names. Disks with custom names cannot be linked to a VM from billing, so they are not checked.

## Related

* [Delete Unattached Azure Managed Disk](https://help.nops.io/inform/supported-recommendations/delete-unattached-azure-managed-disk)
* [Delete Azure Snapshots Older than 90 Days](https://help.nops.io/inform/supported-recommendations/delete-azure-snapshots-older-than-90-days)
* [Shut Down Underutilized Azure Virtual Machine](https://help.nops.io/inform/supported-recommendations/shut-down-underutilized-azure-virtual-machine)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.