---
title: "Free up space in the Container Registry"
sidebar_label: "Free up space in the registry"
description: "How to run Garbage Collection to delete unused data: image layers and untagged images"
sidebar_position: 2
---

import Formbricks from '@theme/MDXComponents/Formbricks'

# Free up space in the Container Registry

To free up space in the Container Registry, you can [delete unused data](#delete-unused-data). Garbage Collection is used to delete unused data in the registry. The service collects unused data that can be deleted:

* [image layers](#image-layers) that are not referenced by any manifest;
* images without [tags](/craas/about/about-craas.mdx#tag-and-hash) that appear after updating images.

## Image layers \{#image-layers}

A container image is described in a manifest, which contains a description of the image layers (`layers`).

Each layer contains changes to the image relative to the previous layer. The last layer combines all layers and is the current version of the image. Learn more about layers in the [Image Format Specification](https://github.com/opencontainers/image-spec/blob/main/spec.md) in the Open Container Initiative documentation on GitHub.

Example of layer description in a manifest:

```json
"layers": [
  {
    "mediaType": "application/vnd.docker.image.tar.gzip",
    "size": 48394,
    "digest": "sha256:b6bc5667d566e6c6"
  },
  {
    "mediaType": "application/vnd.docker.image.tar.gzip",
    "size": 17453,
    "digest": "sha256:1205abcd5b522e6b"
  },
  {
    "mediaType": "application/vnd.docker.image.tar.gzip",
    "size": 35279,
    "digest": "sha256:fa46023e1248d8676"
  }
]
```

A single layer can be used by multiple manifests. Garbage Collection collects layers that are not referenced by any manifest — such layers do not use images and can be safely deleted.

## Delete unused data \{#delete-unused-data}

:::info

During the data removal (registry cleanup) process, you can download images, but you cannot push new ones — the layers of the image being pushed may be deleted, which will lead to an image error.

:::

1. In the [Control panel](https://my.selectel.ru/vpc/default/craas/), in the top menu, click **Products** and select **Container Registry**.
2. Open the **Registries** tab.
3. The registry page will show the amount of unused data in this registry. Click **Clear**.
4. Optional: select the **Untagged images** checkbox to delete them as well. By default, only unused image layers are deleted.
5. Click **Clear**.

<Formbricks />
