acr
acr copied to clipboard
purge --untagged removes tagged images
Mirror of this issue: https://github.com/MicrosoftDocs/azure-docs/issues/81172
Describe the bug
If I use acr purge --untagged
, tagged images are removed.
To Reproduce I ran
az acr run --cmd "acr purge --untagged --filter 'some/repository:.*' --ago 1d" --registry myRegistry /dev/null
in a cloud shell.
Much to my surprise, this did not only remove untagged images (those whose tag is None) in that repository but removed ALL images in the repository. This seems like a huge issue.
Expected behavior Only untagged images in the repository are removed.
Any relevant environment information
- OS: Cloud shell
- Azure CLI/PowerShell/SDK version
{
"azure-cli": "2.28.0",
"azure-cli-core": "2.28.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"ai-examples": "0.2.5",
"ssh": "0.1.6"
}
}
- Datetime (UTC) when the issue occurred: Right now
@toddysm should we consider deprecating this flag or renaming it. It’s a breaking change so need to do this more carefully. Gil might be able to provide some feedback on this.
@fuglede - that is the right repository to open the issue.
I'm using this command to remove untagged only
$PURGE_CMD="acr purge --filter '^MyRepository:THIS_IS_REQUIRED_BUT_NOT_USED$' --untagged --ago 7d --dry-run"
az acr run --cmd "$PURGE_CMD" --registry MyRegistry /dev/null
Closing as this has been inactive. Please open a support ticket with our team for assistance.