Skip to content

[Feature] Tag delete flag not to fail if tag already deleted #928

@vooon

Description

@vooon

In scripts you may delete many tags (e.g. per-arch tags like foo-bar-aarch64), and in case of network errors you may have retries.
So part of tags may be already deleted.

Current Behavior

regctl tag delete registry/image:foo-bar-aarch64
failed to request manifest head registry/image:foo-bar-aarch64: request failed: not found [http 404]:
echo $? # != 0

Expected Behavior

Add flag like --missing-ok, so:

regctl tag delete --missing-ok registry/image:foo-bar-aarch64
warning: failed to request manifest head registry/image:foo-bar-aarch64: 404
echo $? # == 0

Example Solution

Version

go install @latest

VCSTag:     v0.8.2
VCSRef:     unknown
VCSCommit:  unknown
VCSState:   unknown
VCSDate:    unknown
Platform:   linux/amd64
GoVer:      go1.24.0
GoCompiler: gc

Environment

  • Running as binary or container: both options
  • Host platform: linux
  • Registry description: harbor & zot

Anything else

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions