Delete a container image and tag

In Bitbucket Cloud, you can delete either a container image tag or the entire container image, including all of its associated tags.

Only users with repository write permission can delete a container image tag.

Delete a container image tag

Deleting a container image tag permanently removes it from Bitbucket Cloud. Once it is deleted, the tag can no longer be pulled. To delete a container image tag:

  1. From the packages list view under the workspace, project, or repository, select the image containing the tag you want to delete.

  2. From the image tags list view, select More actions ().

  3. Select Delete tag, then Confirm.

Deleting a container image tag does not immediately free up the storage.

Delete a container image

Only users with repository admin permission can delete a container image.

Deleting a container image permanently removes it and all of its tags from Bitbucket Cloud. Once deleted, the image and all its tags can no longer be pulled. To delete a container image:

  1. From the packages list view under the workspace, project, or repository, select the image you want to delete.

  2. From the images list view, select More actions ().

  3. Select Delete image, then Confirm.

Deleting a container image tag does not immediately free up the storage.

Free up storage

How container images and tags are stored

Container images and tags are references that point to a manifest (or manifest list). A manifest lists the blobs or layers that make up the image.

Bitbucket container registry stores those blobs once in a blob store within the same workspace. Multiple manifests or images can reference the same blob if layers are identical.

Deleting a container image or tag doesn’t immediately free up space

Deleting an image or tag typically removes the reference to manifest mapping. The manifest and the blobs remain on disk because:

  • Another tag or manifest might still reference them.

  • The registry doesn’t immediately delete blobs on tag removal to avoid race conditions (for example, concurrent pushes).

  • Bitbucket container registry uses a separate cleanup step to safely find blobs that are truly unreferenced.

After you delete tags, the blob files still exist, and storage space is not freed until cleanup runs.

How garbage collection frees the storage

Bitbucket container registry has a garbage collection process to clean up storage. This is triggered when:

  • A same tag is being pushed

  • A container image is deleted

  • A container image tag is deleted

When garbage collection is triggered, a background task is kicked off to identify blobs that are unreferenced and delete them, which frees up storage.

Still need help?

The Atlassian Community is here for you.