Spencer Trinh
Spencer Trinh

Reputation: 783

how to purge azure acr failed tasks?

When I issue command: az acr task list-runs --registry <regname> --output table

I get a long list of some failed and successful tasks. I want to purge the failed ones so it's easier to read the table. How can I do this? I found articles Automatically purge images from an Azure container registry that show how to set up a task to purge old container images, but not tasks. Also looking at the documentation on, I can't seem to delete a specific task based on tag label, az acr task delete. Is this even do-able? Thanks.

Upvotes: 0

Views: 425

Answers (1)

Charles Xu
Charles Xu

Reputation: 31462

You can use the parameter --run-status to filter the failed task:

az acr task list-runs --registry <regname> --run-status Succeeded --output table

And you only can delete the task by the name, the tag label does not be supported.

Upvotes: 0

Related Questions