Deletion of soft delete container

Nayan 40 Reputation points
2024-04-23T08:51:03.5133333+00:00

Is there any option to perfom force deletion of a container on a storage account that has been soft deleted

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,734 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,471 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sumarigo-MSFT 43,911 Reputation points Microsoft Employee
    2024-04-23T09:47:14.57+00:00

    @Nayan Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    There is no “hard delete” option for containers; however, there is a workaround. The customer can undelete the container in question, turn off soft delete for containers, and then re-delete the container. It will permanently delete that container, but not affect any other containers that are in the soft deleted state at the time. They can then re-enable soft delete for containers if you wish.

    Please let us know if you have any further queries. I’m happy to assist you further.    


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Amrinder Singh 2,770 Reputation points Microsoft Employee
    2024-04-23T09:35:34.0333333+00:00

    Hello Nayan - Thanks for reaching out on Q&A Forum.

    There isn't any option to force delete a soft deleted container. The workaround is to

    Undelete that container -> Disable the soft delete for container -> Perform the deletion of that container -> Re-enable the soft delete for container feature back again.

    Please let us know if you have any further queries. I’m happy to assist you further.    


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

  2. Anand Prakash Yadav 6,390 Reputation points Microsoft Vendor
    2024-04-23T10:16:19.6766667+00:00

    Hello Nayan,

    Thank you for posting your query here!

    When a container in Azure Storage has been soft deleted, it enters a soft deleted state for a specific retention period. All soft-deleted data is billed at the same rate as active data. You won't be charged for data that is permanently deleted after the retention period elapses.

    https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-blob-overview#pricing-and-billing

    With the soft-delete option enabled in Azure, you cannot permanently delete a blob before the retention period expires. The soft-delete feature is designed to protect your data from accidental deletion. When an object is deleted or overwritten, it is retained for a specified period of time (between 1 and 365 days) during which you can restore it.

    https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-blob-manage

    However, there is a workaround mentioned in a GitHub discussion. According to the discussion, you can first disable the soft-delete option, then select the Blob Containers via Microsoft Azure Storage Explorer, choose Active and deleted blobs, undelete the deleted blobs, and then remove them again. This way, the blobs are permanently deleted.

    Note: Once the soft-delete option is disabled, any blobs that are deleted will be permanently deleted immediately.

    Further articles for your reference: https://techcommunity.microsoft.com/t5/azure-paas-blog/azure-storage-permanent-delete-soft-deleted-objects/ba-p/3600967

    https://stackoverflow.com/questions/75252310/error-while-permanent-deleting-soft-deleted-blob-through-rest-api

    Additionally, if you have any suggestions for our team, the best approach is to share your feedback where it will receive more visibility, allowing the community to upvote it: https://feedback.azure.com/forums/217298-storage

    I hope this helps! Please let me know if the issue persists or if you have any other questions.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members. 

    0 comments No comments