I just want to clean (dump, zap, del .) an Azure Blob container. How can I do that?
Note: The container is used by IIS (running Webrole) logs (wad-iis-logfiles).
We are pleased to announce that we have made an Azure Logic Apps template available to expire old blobs. To set up this automated solution in your environment: Create a new Logic Apps instance, select the “Delete old Azure blobs” template, customize and run.
In the Azure portal, navigate to your storage account. Locate the Data protection settings under Data management. Select Enable soft delete for containers. Specify a retention period between 1 and 365 days.
A one liner using the Azure CLI 2.0:
az storage blob delete-batch --account-name <storage_account_name> --source <container_name>
Substitute <storage_account_name>
and <container_name>
by the appropriate values in your case.
You can see the help of the command by running:
az storage blob delete-batch -h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With