Delete a tag or an image
Delete a tag, and the image with its last tag, or delete an untagged image that still costs storage.
Last updated 18 November 2026View as Markdown
Deleting a tag removes the name. When it was the image's last tag, the image goes with it, together
with its signatures and SBOMs. An image no tag points at is deleted on its own. Replace
repository-id with the repository's id and manifest-id with the image's
manifest.id from the image list.
Warning
A deleted image cannot be restored, and anything pulling it by digest stops working.
Prerequisites
- Permission for
ecr:DeleteImageon the repository. It is allowed in a repository with immutable tags too. - In the console, also
ecr:DescribeRepositorieson the repository; without it the repository's page answers 404.
Delete a tag
- Open Image repositories, then open the repository.
- On the Images tab, open the image row's action menu and choose Delete tag v1.2.0.
- Choose Delete image.
dcloud ecr images delete-tag repository-id v1.2.0DELETE /ecr/api/repositories/repository-id/tags/v1.2.0Delete an untagged image
The Images tab marks such an image untagged; the Tag filter with Untagged lists only them.
- On the Images tab, open the untagged row's action menu and choose Delete untagged image.
- Choose Delete image.
dcloud ecr images delete-untagged repository-id manifest-idDELETE /ecr/api/repositories/repository-id/manifests/manifest-idResult
- A tag delete answers
200with{ tag }; an untagged image delete answers200with{ digest }. - When an image is deleted, an
ECR Image Actionevent withaction-typeDELETEgoes to your event bus. - Layers are shared between images, so they are not deleted at once: layer cleanup deletes the ones no image uses any more (see Storage and cleanup).
If it is refused
409This image is still tagged v1.2.0. Delete the tag instead; the image goes with the last one.for an untagged-image delete of an image that has a tag.404Not foundwhen the repository, the tag or the image does not exist.
Related
- Set a lifecycle policy to delete images automatically.
DELETE /ecr/api/repositories/{id}/tags/{tag}·DELETE /ecr/api/repositories/{id}/manifests/{manifestId}
Did this page help you?