Delete Storage Container

Handian Sudianto 5,666 Reputation points
2023-06-07T07:33:49.3933333+00:00

Hello,

What should i do when try to dleete container on the storage account i got error 'Failed to delete 1 out of 1 container(s): xxx: The storage account xxx container xxx is protected from deletion due to ImmutableStorageWithVersioning.'

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.
3,312 questions
{count} votes

Accepted answer
  1. Sumarigo-MSFT 47,461 Reputation points Microsoft Employee
    2023-06-13T09:38:26.6833333+00:00

    @Handian Sudianto Can you, please share the screenshot of the error message?

    Can you try to delete through storage explorer and let me know the status

    Additional information: The storage account, container, or object (identified by "xxx") is protected from deletion due to the feature called Immutable Storage with Versioning.

    Immutable Storage with Versioning is a feature in Azure Blob Storage that provides enhanced data protection by preventing accidental or malicious deletion or modification of data. When this feature is enabled, it ensures that data stored in the container or object cannot be modified or deleted for a specified retention period. This helps maintain data integrity and compliance with regulatory requirements.

    To modify or delete data protected by Immutable Storage with Versioning, you will need to disable the feature or wait until the retention period expires. It's important to carefully consider the implications before modifying or disabling this protection feature, as it provides an additional layer of data protection.

    https://learn.microsoft.com/en-us/answers/questions/155202/cannot-delete-a-storage-account-with-containers-wi


3 additional answers

Sort by: Most helpful
  1. AirGordon 7,140 Reputation points
    2023-06-07T09:37:58.6366667+00:00

    You should navigate to the Storage Container, then choose Access Policy under Settings.

    You'll then see a list of Immutable Storage policies that you have configured.

    eg.

    User's image

    You will need to remove the policies before being able to delete the storage account.

    Note that Immutable policies have strict rules governing the deletion of data. Depending on the type of Immutable policy you have, will change how you remove it. If it is time based in a locked state, and the retention interval has not passed then it will not be possible to remove (such is the purpose of this feature).


  2. Handian Sudianto 5,666 Reputation points
    2023-06-16T07:12:45.96+00:00

    I can delete the storage account now after i delete all files in the container. If in container have any files, we can't delete the container or storage account.

    0 comments No comments

  3. Handian Sudianto 5,666 Reputation points
    2023-07-10T05:05:56.2166667+00:00

    I can delete the storage account now after i delete all files in the container. If in container have any files, we can't delete the container or storage account.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.