v1

latestOpenAPI 3.0.02026-07-14285059.6 KB
images

Delete images

Deletes one or more images within a namespace. This is currently limited to a single repository.

If you attempt to delete images that are marked as active or are currently tagged, the deletion does not happen and it displays the warnings. To continue with the deletion, you must ignore these warnings by putting them in the ignore_warnings property.

Deleting a currently tagged image deletes the tag from the repository.

You cannot ignore errors. It is not possible to directly delete children of multi-arch images.

post/v2/namespaces/{namespace}/delete-images

Path parameters

namespacestring required

Namespace of the repository.

Request body

active_fromstring

Sets the time from which an image must have been pushed or pulled to be counted as active.

Defaults to 1 month before the current time.

dry_runboolean

If true then will check and return errors and unignored warnings for the deletion request but will not delete any images.

Example request

{
  "active_from": "2020-12-01T12:00:00Z",
  "ignore_warnings": [
    {
      "digest": "sha256:1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "repository": "myrepo",
      "tags": [
        "latest"
      ],
      "warning": "current_tag"
    }
  ],
  "manifests": [
    {
      "digest": "sha256:1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqr",
      "repository": "myrepo"
    }
  ]
}

Response

Deletion completed

dry_runboolean

Whether the request was a dry run or not.

Example response

{
  "metrics": {
    "manifest_deletes": 3,
    "tag_deletes": 1
  }
}