I have some vm image versions in a vm image definition in a compute gallery. Azure cli’s image commands will only work on the entire Azure marketplace (https://learn.microsoft.com/en-us/cli/azure/vm/image?view=azure-cli-latest#az-vm-image-show) and acr purge only works on Container Registries and won’t accept the compute gallery name.
PURGE_CMD="acr purge
> --filter 'mydefinition:.*'
> --ago 7d --dry-run"
az acr run --cmd "$PURGE_CMD" --registry mycomputegallery /dev/null
The resource with name ‘mycomputegallery’ and type ‘Microsoft.ContainerRegistry/registries’ could not be found