Recovery services vault cannot be deleted

In this Azure Article, we will discuss how to fix the error, ” recovery services vault cannot be deleted as there are existing resources within the vault. “. I got this error when deleting one of the Recovery Services vaults.

Recovery services vault cannot be deleted as there are existing resources within the vault.

Recently, I was trying to clear the unused Azure resources to reduce the cost. When I tried to delete one of the Azure Recovery Services vaults, it didn’t allow me to delete it, and I got this error.

The complete error message was as below.

Vault cannot be deleted as there are existing resources within the vault: Please ensure all containers have been unregistered from the vault and all private endpoints associated with the vault have been deleted, and retry the operation. For more details, see https://aka.ms/AB-AA4ecq5

I followed the below steps to delete the Azure Recovery Service vault. My Azure Recovery Service vault name was vault938, and I was trying to delete it.

To delete the Azure recovery services vault, Navigate to the Recovery Services vault and click on the Recovery Services vault you want to delete. On the Recovery Services vault page, click on the Delete button.

cannot delete the backup vault as there are existing backup instances or backup policies in the vault.

Then I clicked on the Yes button for the confirmation

recovery services vault cannot be deleted as there are backup items still present in soft delete state

I got the Vault deletion error, as shown below.

recovery services vault cannot be deleted as there are existing resources within the vault.

Now, the reason I got this error is that there is a Backup item for the Azure Virtual Machine that is attached to this Recovery Services vault. To check that, click the Backup items link under Protected items on the Recovery Services vault page.

recovery services vault cannot be deleted as there are backup items still present in soft delete state.

After clicking on the Backup items, you can see that the Azure Virtual Machine has a backup item count of 1. Click on the Azure Virtual Machine.

delete recovery services vault

You can see below this is the Virtual Machine backup instance that is attached to the Azure Recovery Services vault.

recovery services vault soft delete

Delete the Backup Items(Azure Virtual Machine) to fix this error.

To delete this, select the Azure Virtual Machine backup instance, click on the three dots (…), or right-click on it for the same options, and then click on the stop backup option.

how to delete recovery service vault in azure

Now click on the Stop Backup button to confirm the Stop Backup functionality.

recovery service vault soft delete

Now, you can see the stopping backup functionality was completed successfully.

how to delete recovery services vault

Now, after stopping the backup, select the Azure Virtual Machine backup instance, click on the three dots (…), or you can right-click on that for the same options and then click on the Delete backup data option