CmdID / az / az acr / az acr config / az acr config retention
az acr config retention update
Update retention policy for an Azure Container Registry. Azure CLI reference
2 examples Its page in the Azure CLI reference
Examples
Enable retention policy for an Azure Container Registry to delete an untagged manifest after 30 days.
az acr config retention update -r myregistry --status Enabled --days 30 --type UntaggedManifestsIdentify-rName of registry.--statusIndicates whether retention policy is enabled.--daysThe number of days to retain an untagged manifest after which it gets purged (Range: 0 to 365).--typeThe type of retention policy.Enable retention policy for an Azure Container Registry to delete a manifest as soon as it gets untagged.
az acr config retention update -r myregistry --status Enabled --days 0 --type UntaggedManifestsIdentify-rName of registry.--statusIndicates whether retention policy is enabled.--daysThe number of days to retain an untagged manifest after which it gets purged (Range: 0 to 365).--typeThe type of retention policy.