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.

Then I clicked on the Yes button for the confirmation

I got the Vault deletion error, as shown below.

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.

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.

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

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.

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

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

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
