Search code examples
azuresubscription

Azure CLI - delete subscription?


I am looking for a way to delete Azure subscription programmatically. I'm mainly interested in Azure CLI but i can not find the way to do that in proper way.

By the way there is PowerShell Command which provide exactly needed action. Remove-AzureSubscription


Solution

  • there is no way to delete a subscription. the linked cmdlet doesn't do what you think it does:

    The Remove-AzureSubscription cmdlet deletes an Azure subscription from your subscription data file so Windows PowerShell can't find it. This cmdlet does not delete the subscription from Microsoft Azure, or change the actual subscription in any way.

    only Azure Support might be able to help you, although in my case they said its impossible to delete subscriptions.