gcloud alpha artifacts docker images delete Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha artifacts docker images delete - delete an Artifact Registry container image
- SYNOPSIS
gcloud alpha artifacts docker images deleteIMAGE[--async][--delete-tags][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)A valid container image has the format ofLOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE
A valid container image that can be referenced by tag or digest, has the formatof
LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE:tagLOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE@sha256:digest
This command can fail for the following reasons:
- Trying to delete an image by digest when the image is still tagged. Add--delete-tags to delete the digest and the tags.
- Trying to delete an image by tag when the image has other tags. Add--delete-tags to delete all tags.
- A valid repository format was not provided.
- The specified image does not exist.
- The active account does not have permission to delete images.
- EXAMPLES
- To delete image
busy-boxinus-west1and all of itsdigests and tags:gcloudalphaartifactsdockerimagesdeleteus-west1-docker.pkg.dev/my-project/my-repository/busy-boxTo delete image digest
abcxyzunder imagebusy-box:gcloudalphaartifactsdockerimagesdeleteus-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyzTo delete image digest
abcxyzunder imagebusy-boxwhile there're other tags associate with the digest:gcloudalphaartifactsdockerimagesdeleteus-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyz--delete-tagsTo delete an image digest and its only tag
my-tagunder imagebusy-box:gcloudalphaartifactsdockerimagesdeleteus-west1-docker.pkg.dev/my-project/my-repository/busy-box:my-tag - POSITIONAL ARGUMENTS
IMAGE- A container image.
A valid container image has the format ofLOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE
A valid container image that can be referenced by tag or digest, has the formatof LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE:tagLOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY-ID/IMAGE@sha256:digest
- FLAGS
--async- Return immediately, without waiting for the operation in progress to complete.
--delete-tags- If specified, all tags associated with the image are deleted.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudartifactsdockerimagesdeletegcloudbetaartifactsdockerimagesdelete
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-22 UTC.