---
title: "List Garbage Collections"
method: GET
path: "/v2/registry/{registry_name}/garbage-collections"
tags: ["DigitalOcean-public.v2-new_Container Registry"]
---

# List Garbage Collections

`GET /v2/registry/{registry_name}/garbage-collections`

To get information about past garbage collections for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collections`.

## Path parameters

- `registry_name` string, required

## Query parameters

- `per_page` integer
- `page` integer

## Response `200`

The response will be a JSON object with a key of `garbage_collections`. This will be set to an array containing objects representing each past garbage collection. Each will contain the standard Garbage Collection attributes.

- object
  - `garbage_collections` GarbageCollection[]
    - `uuid` string — A string specifying the UUID of the garbage collection.
    - `registry_name` string — The name of the container registry.
    - `status` 'requested' | 'waiting for write JWTs to expire' | 'scanning manifests' | 'deleting unreferenced blobs' | 'cancelling' | 'failed' | 'succeeded' | 'cancelled' — The current status of this garbage collection.
    - `created_at` string, date-time — The time the garbage collection was created.
    - `updated_at` string, date-time — The time the garbage collection was last updated.
    - `blobs_deleted` integer — The number of blobs deleted as a result of this garbage collection.
    - `freed_bytes` integer — The number of bytes freed as a result of this garbage collection.

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
