ACR storage is not released after deleting many images and helm charts.

Vijayakumar Balasubramaniyan 0 Reputation points
2025-10-06T10:43:13.76+00:00

We are using a premium ACR where I have set the retention period to 1 day. I deleted 100s of docker images and helm charts which should have released a minimum of 100GB, but the used storage size remains the same even after 3 days since i deleted the images and charts.

I don't see the automatic GC kicked in and also not able to find a way to trigger the GC manually. Any help on this matter is appriciated.

I am using the following commands:
az acr repository delete --name ${registry} --image ${repository}:${tag} --yes
az acr run --cmd "acr purge --filter '${repository}:${regexPattern}' --untagged --ago ${retentionDays}d" --registry ${registry} --timeout 3600 /dev/null

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
{count} votes

1 answer

Sort by: Most helpful
  1. Nikhil Duserla 9,280 Reputation points Microsoft External Staff Moderator
    2025-10-06T16:16:15.7666667+00:00

    Hello Vijayakumar Balasubramaniyan,

    To maintain the size of your Azure container registry, you should periodically delete stale image data. While some container images deployed into production may require longer-term storage, others can typically be deleted more quickly. For example, in an automated build and test scenario, your registry can quickly fill with images that might never be deployed and can be purged shortly after completing the build and test pass.

    Because you can delete image data in several different ways, it's important to understand how each delete operation affects storage usage. This article covers several methods for deleting image data:

    • Delete a repository: Deletes all images and all unique layers within the repository.
    • Delete by tag: Deletes an image, the tag, all unique layers referenced by the image, and all other tags associated with the image.
    • Delete by manifest digest: Deletes an image, all unique layers referenced by the image, and all tags associated with the image.

    Note- After you delete image data, Azure Container Registry stops billing you immediately for the associated storage. However, the registry recovers the associated storage space using an asynchronous process. It takes some time before the registry cleans up layers and shows the updated storage usage.

    Please refer to this link for more details- https://xtls-v4.hkg1.meaqua.org/en-us/azure/container-registry/container-registry-delete?source=recommendations

    If you have any further queries, do let us know.

    0 comments No comments

Your answer

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