gcrane Verified current stable Not installed? Version Control

Gcrane / List Untagged Images

List Untagged Images

Identifies and lists untagged images within a specified GCR repository.

$
Terminal
gcrane gc <repository>

When To Use

When clearing up space or preparing for image tagging and retention policies.

Pro Tip

Combine with manual audits to ensure untagged images identified are indeed obsolete before deletion.

Anatomy of Output

Understanding the result

UNTAGGED IMAGES: gcr.io/my-repo/image1 Untagged Image

Image lacking a tag in the specified repository.

UNTAGGED IMAGES: gcr.io/my-repo/image2 Untagged Image

Additional untagged image found.

TOTAL UNTAGGED IMAGES: 5 Count

Total number of untagged images in the repository.

Power User Variants

Optimized versions

gcrane gc gcr.io/my-repo --dry-run

Simulate untagged image listing without deletion.

gcrane gc gcr.io/my-repo --all

List untagged images across all hierarchies.

Troubleshooting

Common pitfalls

Error: repository 'gcr.io/my-repo' is empty.

Solution: Verify the repository contains images or correct the specified name.

Error: unable to access GCR for untagged images.

Solution: Inspect IAM permissions for necessary read access.

Error: invalid repository name format.

Solution: Ensure proper GCR naming conventions are followed.

Command Breakdown

What each part is doing

gcrane
Base Command
The executable that performs this operation. Here it runs Gcrane before the shell applies any redirect operators.
<repository>
repository
The value supplied for repository.

Alternative Approaches

Comparable commands in other tools

Alternative version control tools for the same job.