Skip to content

docs(acr purge): document --include-locked parameter (acr-cli ≥ 0.17)#159

Open
estebanreyl wants to merge 6 commits into
MicrosoftDocs:mainfrom
estebanreyl:esrey/purge-include-locked-doc
Open

docs(acr purge): document --include-locked parameter (acr-cli ≥ 0.17)#159
estebanreyl wants to merge 6 commits into
MicrosoftDocs:mainfrom
estebanreyl:esrey/purge-include-locked-doc

Conversation

@estebanreyl

@estebanreyl estebanreyl commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

acr purge supports the --include-locked parameter, which purges tags and manifests even when their write-enabled or delete-enabled attribute is set to false. For each matching locked artifact, the command unlocks it with said flag (sets both attributes back to true) before deleting it. The parameter is available beginning with mcr.microsoft.com/acr/acr-cli:0.17.

Changes

Added --include-locked to the optional parameters list, with a version note.

Why

This flag has been supported for a while, but we forgot to update the public docs. The acr-cli docs document the flag here: https://github.com/Azure/acr-cli#include-locked-flag

Validation

I double checked by verifying end-to-end against a live registry for both code paths (locked tag and locked untagged manifest): without the flag the locked artifact is skipped; it, the artifact is unlocked, then deleted. This also matches our docs on the acr-cli repo.

acr purge now supports the --include-locked parameter, which unlocks
tags and manifests whose write-enabled or delete-enabled attribute is
false before deleting them. Update the auto-purge doc to correct the
prior note that stated locked artifacts are never purged, and add the
parameter to the optional parameters list.
- auto-purge: note that --include-locked is available beginning with
  acr-cli:0.17.
- image-lock: note that locking doesn't protect an image from
  acr purge --include-locked, which unlocks artifacts before deleting.
- image-lock: reword the note to make clear that locking does protect an
  artifact until an authorized identity removes the lock; acr purge
  --include-locked disables the attributes before deleting rather than
  bypassing protection.
- auto-purge: add a CAUTION that --include-locked disables write/delete
  protection on all matching artifacts, deletes unrecoverably, and to
  use --dry-run first.
Fold the version-availability sentence into the --include-locked bullet
and remove the standalone note; trim the caution block.
Relocate the note to the Unlock section, stop reintroducing what a lock
is, and clarify that acr purge automatically unlocks matching tags or
manifests before deleting them when it has sufficient permissions.
@prmerger-automator

Copy link
Copy Markdown
Contributor

@estebanreyl : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 33fdb64:

✅ Validation status: passed

File Status Preview URL Details
articles/container-registry/container-registry-auto-purge.md ✅Succeeded
articles/container-registry/container-registry-image-lock.md ✅Succeeded

For more details, please refer to the build report.

@v-dirichards
v-dirichards requested a review from Copilot July 10, 2026 15:09
@v-dirichards

Copy link
Copy Markdown
Contributor

@KumudD

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged C+L Pull Request Review Team label label Jul 10, 2026
@prmerger-automator

Copy link
Copy Markdown
Contributor

@estebanreyl : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Azure Container Registry documentation to reflect acr purge support for the --include-locked parameter (acr-cli ≥ 0.17), including behavior and safety guidance when purging locked artifacts.

Changes:

  • Documented --include-locked in the acr purge optional parameters list, with minimum acr-cli version information.
  • Added/expanded guidance explaining that locked artifacts are skipped by default and can be unlocked+deleted when --include-locked is used.
  • Added a caution callout warning that --include-locked overrides locking protections and recommending --dry-run.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
articles/container-registry/container-registry-image-lock.md Adds a note explaining that acr purge --include-locked can unlock and delete locked artifacts, linking to auto-purge guidance.
articles/container-registry/container-registry-auto-purge.md Documents --include-locked behavior, minimum acr-cli version, and adds a caution about unrecoverable deletion when overriding locks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread articles/container-registry/container-registry-auto-purge.md Outdated
Comment thread articles/container-registry/container-registry-image-lock.md
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 5d09f7f:

✅ Validation status: passed

File Status Preview URL Details
articles/container-registry/container-registry-auto-purge.md ✅Succeeded
articles/container-registry/container-registry-image-lock.md ✅Succeeded

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants