glab-container-registry
Manage GitLab container registry repositories and tags with glab. Use when listing, viewing, or deleting container registry repositories/tags, cleaning old image tags, inspecting tag metadata, or using glab container-registry commands. Triggers on container registry, registry repository, registry tags, image tags, glab container-registry.
How do I install this agent skill?
npx skills add https://github.com/vince-winkintel/gitlab-cli-skills --skill glab-container-registryIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides instructions for managing GitLab container registries using the standard glab CLI tool. It includes guidance on common workflows and safety notes for destructive operations.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
glab container-registry
Manage GitLab container registry repositories and tags from the CLI.
Repository IDs come from registry repository list/view output, not from Git repository project IDs.
Common workflows
# List registry repositories for the current project
glab container-registry repository list
# List repositories for another project
glab container-registry repository list -R gitlab-org/cli
# List repositories for a group
glab container-registry repository list --group gitlab-org
# Include tag counts/tags in project repository output
glab container-registry repository list --include-tags-count --include-tags
# JSON output for automation
glab container-registry repository list --output json --jq '.[].id'
Repository commands
# View a registry repository
glab container-registry repository view <repository-id>
# Include tags in the repository response
glab container-registry repository view <repository-id> --include-tags
# Delete a repository and all images/tags published to it (destructive)
glab container-registry repository delete <repository-id>
glab container-registry repository delete <repository-id> --yes
Aliases: repository ls, repository show, and repository del.
Tag commands
# List tags for a registry repository
glab container-registry tag list <repository-id>
# List tags for a repository in another project
glab container-registry tag list <repository-id> -R owner/repo
# Include digest, size, and creation time for each tag
glab container-registry tag list <repository-id> --details
# View a specific tag
glab container-registry tag view <repository-id> <tag-name>
# Delete one tag (destructive)
glab container-registry tag delete <repository-id> <tag-name>
glab container-registry tag delete <repository-id> <tag-name> --yes
Aliases: tag ls, tag show, and tag del.
Bulk tag cleanup
Bulk deletion is scheduled asynchronously by GitLab. Matching tags may remain visible until the background deletion job completes.
# Schedule tags matching a regex for deletion
glab container-registry tag delete <repository-id> \
--name-regex-delete '^release-.*' \
--yes
# Delete old tags while keeping the 10 most recent matching tags
glab container-registry tag delete <repository-id> \
--name-regex-delete '.*' \
--keep-n 10 \
--older-than 30d \
--yes
# Keep tags matching a regex during bulk deletion
glab container-registry tag delete <repository-id> \
--name-regex-delete '.*' \
--name-regex-keep '^stable$|^latest$' \
--yes
Bulk flags:
--name-regex-delete <regex>— tag names to delete.--name-regex-keep <regex>— tag names to keep.--keep-n <n>— keep latest N matching tags.--older-than <duration>— delete tags older than durations like7dor1month.
Safety notes
- Treat repository/tag delete commands as destructive; omit
--yesunless the target IDs and regexes have been reviewed. - Use
--output jsonand--jqfor scripts instead of parsing tables. - Use
-R/--repowhenever running outside the target project's checkout.
Reference
See references/commands.md for command synopsis and flags.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/vince-winkintel/gitlab-cli-skills/glab-container-registry">View glab-container-registry on skillZs</a>