Azure Container registry - Cleanup space

Markus Jessl 21 Reputation points
2022-01-28T00:52:16.953+00:00

Hello,

I'm using the Azure Container registry (SKU: Basic) for publishing my Docker Linux Web App from Visual Studio.
Everything works fine but every time I do a deployment the Azure Container registry space keeps growing.

I only have one repository which I also fully cleaned up (I deleted all the tags).
After the cleanup the repository still shows that it has over 300 manifests and the used space was not reduced :(.

How can I remove all deployments I did from the Azure Container registry except the last one ?

Thx a million.

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

Accepted answer
  1. shiva patpi 13,366 Reputation points Microsoft Employee Moderator
    2022-01-29T19:11:54.937+00:00

    Hello @Markus Jessl ,
    How were you trying to delete the tags ?
    Can you take a look at the below article:
    https://learn.microsoft.com/en-us/azure/container-registry/container-registry-delete#automatically-purge-tags-and-manifests-preview
    https://learn.microsoft.com/en-us/azure/container-registry/container-registry-delete

    169622-image.png

    Sometimes, the reason why the used storage didn’t decrease probably because of the untagged manifests didn’t get to be discovered. There are couple of different commands mentioned here in github - take a look at those.
    For example , If you are using the purge command and if you don't include "--untagged" flag - which results in deleting the tags but not the manifests themselves and not releasing the space as a result

    https://github.com/Azure/acr-cli#untagged-flag

    Finally , take a look at the retention policies: https://learn.microsoft.com/en-us/azure/container-registry/container-registry-retention-policy

    Regards,
    Shiva.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.