google / google/go-containerregistry

`crane delete` should be able to delete multiple refs at once

Open
#843 3 comments 0 reactions 1 assignee Claimed by @imjasonh View on GitHub
lifecycle/frozen
Dominant language
Go
Stars
4k
Forks
686
Avg merge
2d 12h
Merged PRs (30d)
26

Description

`crane delete` only accepts one image ref to delete. This leads [`gcrane gc`'s example](https://github.com/google/go-containerregistry/blob/master/cmd/gcrane/README.md#gc) to pass each gc-able ref to `crane delete` with `xargs -n1`, and each `crane delete` invocation comes with the overhead of individual CLI invocations, auth handshakes, etc.

Instead, `crane delete` should interpret all positional args as refs to parse and delete, perhaps using a `remote.MultiDelete` which uses a single auth handshake. This should produce a noticeable speedup when GCing a large repo, and let users remove the `-n1` and pass as many args to `crane delete` as the platform allows.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.