Skip to content
Latchkey

skopeo list-tags: Enumerate Repository Tags

skopeo list-tags returns every tag in a repository as JSON, straight from the registry.

When a pipeline needs to find the latest build, clean up old tags, or check whether a tag exists, list-tags gives the full set without any image pull.

What it does

skopeo list-tags queries the registry tag-listing endpoint for a repository (named without a tag) and returns a JSON object with the repository name and a Tags array. It works on any registry that implements the standard tags/list API.

Common usage

Terminal
skopeo list-tags docker://ghcr.io/org/app
# just the tag strings
skopeo list-tags docker://ghcr.io/org/app | jq -r '.Tags[]'
# does a specific tag exist?
skopeo list-tags docker://ghcr.io/org/app \
  | jq -e '.Tags | index("v1.2.3")'

Options

FlagWhat it does
--creds user:passAuthenticate to the registry
--authfile <file>Credential file to use
--tls-verify=falseDisable TLS verification (testing only)
--retry-times <n>Retry transient failures

In CI

Use list-tags with jq to drive cleanup jobs (delete tags older than N) or to assert a release tag was published. The reference must be the repository with no tag; including a tag changes the meaning and can error.

Common errors in CI

"requested access to the resource is denied" or "unauthorized" means the repo is private and you have not logged in. "404 page not found" usually means the registry path includes a tag (drop it) or the repository does not exist. Some registries paginate; very large repos may need repeated calls with a registry-specific cursor.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →