Ola Johansson
Posted on July 7, 2022
This is mostly a note to self and i no credit whatsoever to myself. Info collected mainly from this SO question, but i had some issues with the info there, mainly stuff caused by changes to Azure CLI and some code formatting issues.
https://stackoverflow.com/questions/41446962/how-to-delete-image-from-azure-container-registry
- Login with Azure CLI,
az login
- Pick the correct subscription,
az account set -s your_id
- Then run this command.
az acr repository show-tags -n YourRegistry --repository YourRepository | ConvertFrom-String | %{$_.P2 -replace "[`",]",""} | where {$_ -notin "4698a2ae296ed953890c1d61bfaf370deedfb29f" } | %{az acr repository delete -n YourRegistry --image YourRepository:$_ --yes}
đ đȘ đ
đ©
Ola Johansson
Posted on July 7, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
beginners Kickstarting My DevOps Journey with TrainWithShubhamâs Zero to Hero Course
September 28, 2024