2

I want to delete a service plan in azure, but it shows me the error that the service plan is attached by a App Service. "Only empty App Service Plans can be deleted".

The Overview of the service plan shows 0/0. Is this a bug in azure and what is the workaround?

  • Try the powershell `Remove-AzureRmAppServicePlan -Name -ResourceGroupName ` – Joy Wang May 18 '18 at 09:24
  • Some times I have found that the UI updates and shows 0 services/apps but it takes up to 24 hours for the plan to be delete-able. – Murray Foxcroft May 18 '18 at 09:28
  • I had an app service plan with no services that I couldn't delete (no delete button shown). Even leaving it over 24 hours and doing hard-refresh it didn't go away but just closing the window and opening it again it was gone – Andy Apr 29 '21 at 16:11

1 Answers1

0

I would try to delete the service plan using PowerShell using the Remove-AzureRmAppServicePlan cmdlet. Example:

Login-AzureRmAccount
Remove-AzureRmAppServicePlan -ResourceGroupName "Default-Web-WestUS" -Name "ContosoASP"

Note: If you have access to more then one subscription with the accout you login, you have to select the desired subscription first using the Select-AzureRmSubscription cmdlet.

Martin Brandl
  • 56,134
  • 13
  • 133
  • 172