> ## Documentation Index
> Fetch the complete documentation index at: https://gcore-doc-1256a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage container registries

export const MethodSection = ({children}) => children ?? null;

export const MethodSwitch = ({children}) => {
  const tabs = React.Children.toArray(children).filter(c => c && c.props && c.props.id);
  const firstId = tabs.length > 0 ? tabs[0].props.id : "";
  const [active, setActive] = React.useState(firstId);
  React.useEffect(() => {
    try {
      const saved = localStorage.getItem("gcore_docs_method");
      if (saved && tabs.find(t => t.props.id === saved)) {
        setActive(saved);
      }
    } catch (_) {}
  }, []);
  React.useEffect(() => {
    try {
      document.querySelectorAll("h2[id], h3[id]").forEach(heading => {
        const visible = heading.offsetParent !== null;
        document.querySelectorAll(`a[href="#${heading.id}"]`).forEach(link => {
          if (link.closest("h1,h2,h3,h4,h5,h6")) return;
          const li = link.closest("li");
          if (li) li.style.display = visible ? "" : "none";
        });
      });
    } catch (_) {}
  }, [active]);
  const handleClick = id => {
    setActive(id);
    try {
      localStorage.setItem("gcore_docs_method", id);
    } catch (_) {}
  };
  return <div>
      <div className="not-prose flex gap-0 border-b border-zinc-200 dark:border-zinc-800 mb-8 mt-2" role="tablist">
        {tabs.map(tab => {
    const isActive = active === tab.props.id;
    return <button key={tab.props.id} role="tab" aria-selected={isActive} onClick={() => handleClick(tab.props.id)} className={["px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors cursor-pointer", isActive ? "border-primary text-primary" : "border-transparent text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"].join(" ")}>
              {tab.props.label}
            </button>;
  })}
      </div>

      {tabs.map(tab => <div key={tab.props.id} style={{
    display: active === tab.props.id ? "" : "none"
  }}>
          {tab.props.children}
        </div>)}
    </div>;
};

<MethodSwitch>
  <MethodSection id="portal" label="Customer Portal">
    All created Container Registries appear in the Gcore Customer Portal on the **Container Registries** page:

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/container-registry-page.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=f21a7886a3e31bc29f04808b2d90f81a" alt="Container registry page in the Customer Portal" width="4244" height="1520" data-path="images/docs/cloud/container-registry/manage-container-registries/container-registry-page.png" />
    </Frame>

    You can change the storage limit for a registry, configure its users and images, or delete the registry if you no longer need it. If you have a large number of registries, you can also use search to find the one that you're looking for.

    ## Change storage limit

    You can adjust your storage limit to host more images in the container registry or optimize storage according to your usage and container requirements.

    To change the storage limit:

    1\. In the Gcore Customer Portal, navigate to **Cloud** > **Container Registries**.

    2\. Find the registry you want to configure and click the three-dot icon next to it.

    3\. Click **Change storage limit**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/container-registry-change-limit.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=a4faf4e7b9b311d0d3de6e375c8d1a6f" alt="Container registry settings with change limit button highlighted" width="4424" height="1344" data-path="images/docs/cloud/container-registry/manage-container-registries/container-registry-change-limit.png" />
    </Frame>

    4\. Enter a new limit and click **Save** to apply the changes.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/set-new-storage-limit.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=cb51a38c1fc5a7d06ad90a6bd07fdaab" alt="A confirmation dialog to change storage limit" width="476" height="269" data-path="images/docs/cloud/container-registry/manage-container-registries/set-new-storage-limit.png" />
    </Frame>

    The storage limit has been changed.

    ## Manage images in the container registry

    Open the **Images** tab to view the following information about the images within your Container Registry:

    * Image name

    * Artifacts associated with the image

    * The number of times the image was pulled from the registry

    * The date and time when the image was last modified

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/images-tab-cropped.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=fb85f16dcee99fc03ed0830a3e5f4158" alt="Images tab in the registry overview" width="4180" height="1520" data-path="images/docs/cloud/container-registry/manage-container-registries/images-tab-cropped.png" />
    </Frame>

    You can do the following actions with images: view and manage related artifacts, pull images from the registry, or delete them. You can also search through the images to find the one that you need.

    **View and manage image artifacts**

    To view image artifacts, click the image name to open it. On the **Artifacts** page, you can check the artifact name, its tags, size, and the last associated push and pull operations. You can also search through the artifacts.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/image-artifacts.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=f2cff27b5380a87a0fa2e9c6fe8c68eb" alt="Images tab with the list of image artifacts" width="4240" height="1812" data-path="images/docs/cloud/container-registry/manage-container-registries/image-artifacts.png" />
    </Frame>

    To delete an artifact or its tag:

    1\. Find the needed artifact and click the three-dot icon next to it.

    2\. Select the required action from the dropdown and proceed with the instructions.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/delete-image-artifact.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=2ab4aa6b0458aa015ead9473b291546a" alt="Image settings with the highlighted delete and delete tags buttons" width="4216" height="1276" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-image-artifact.png" />
    </Frame>

    You can also apply group actions to multiple artifacts. To do so, select checkboxes next to the artifacts you want to manage and choose the needed action from the **Group actions** dropdown.

    **Delete an image**

    1\. On the **Images** tab, find the image you want to remove.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/delete-image.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=00874fcdf9d58e46e81deeec36dbf9aa" alt="Image settings with the highlighted delete button" width="4016" height="1348" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-image.png" />
    </Frame>

    2\. Click the three-dot icon and select **Delete**.

    3\. Confirm your action by typing "Delete" in the text field.

    4\. Click **Delete Image**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/confirm-image-deletion.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=76f33654312e597c62f5131889b6d3e8" alt="Image deletion dialog" width="478" height="186" data-path="images/docs/cloud/container-registry/manage-container-registries/confirm-image-deletion.png" />
    </Frame>

    Your image has been removed from the registry.

    **Delete multiple images with group actions**

    You can simultaneously delete multiple images with **Group actions**. To do so, select checkboxes next to the images you want to manage and use the required action from the dropdown.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/image-group-actions.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=5a0da5204a7e50a17f3e1250560bfc18" alt="Group actions dropdown on the Images tab" width="2692" height="932" data-path="images/docs/cloud/container-registry/manage-container-registries/image-group-actions.png" />
    </Frame>

    ## Manage users in the container registry

    Open the Users tab to view the following information about created users within your Container Registry:

    * Username

    * User permissions

    * The date and time when the user was created

    * (Optional) If the password expiration date was set during user creation, this information will be displayed in the **Expires at** column.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/users-tab.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=959cba0183e3b711de400cd2048b03ac" alt="Users tab in the registry overview" width="2692" height="932" data-path="images/docs/cloud/container-registry/manage-container-registries/users-tab.png" />
    </Frame>

    You can change user permissions, generate a new user password, or delete the user from the registry.

    <Tip>
      **Tip**

      For details on how to create a user, check the [Create a Container Registry](/cloud/container-registry/create-container-registry) guide.
    </Tip>

    **Change user permissions**

    For each user, you can configure the following permissions:

    * **Pull images** : this is helpful if you'd like to prevent unauthorized or accidental changes to the Container Registry. In this case, you can restrict permissions for some users to pull operations only.

    * **Push and push images** : this permission grants full access to the registry and allows users to pull and push any new images or image versions to the registry.

    To change user permissions:

    1\. On the **Users** tab, find the user you want to delete and click the three-dot icon next to it.

    2\. Select **Change permissions**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/change-user-permissions.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=1569db7fbbed08779b977684c42e5253" alt="Users settings with the highlighted change permissions button" width="2624" height="932" data-path="images/docs/cloud/container-registry/manage-container-registries/change-user-permissions.png" />
    </Frame>

    3\. Update the permissions as needed and click **Save** to apply the changes.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/select-new-user-permissions.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=6100c20bf25673d1e51332c104bc741d" alt="Change permissions dialog" width="933" height="276" data-path="images/docs/cloud/container-registry/manage-container-registries/select-new-user-permissions.png" />
    </Frame>

    **Reset user password**

    A user password is automatically generated during user creation. If the password has expired or the user can't remember it, you can regenerate a password as follows:

    1\. On the **Users** tab, find the user you want to delete and click the three-dot icon next to it.

    2\. Select **Reset password**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/reset-user-password.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=b4e964a5543cd0f304e6edea2dcb9dae" alt="Users settings with the highlighted reset password button" width="2624" height="932" data-path="images/docs/cloud/container-registry/manage-container-registries/reset-user-password.png" />
    </Frame>

    3\. Confirm password reset.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/confirm-password-reset.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=196869cc3c458137c50546e92786d833" alt="Reset password confirmation dialog" width="474" height="185" data-path="images/docs/cloud/container-registry/manage-container-registries/confirm-password-reset.png" />
    </Frame>

    4\. Copy the password and save it locally. Keep in mind that you won't be able to view it again.

    **Delete a user**

    1\. On the **Users** tab, find the user you want to delete and click the three-dot icon next to it.

    2\. Select **Delete**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/delete-user.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=0a9c7c813e102b6cf7f688655ff44816" alt="Users settings with the highlighted delete button" width="2624" height="932" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-user.png" />
    </Frame>

    3\. Confirm your action by typing "Delete" in the text field.

    4\. Click **Delete user**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/confirm-user-deletion.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=44f6152890ce96644909ec53ddc69734" alt="Delete user confirmation dialog" width="476" height="206" data-path="images/docs/cloud/container-registry/manage-container-registries/confirm-user-deletion.png" />
    </Frame>

    **Manage multiple users with group actions**

    There's an option to simultaneously delete multiple users or change their permissions using **Group actions**. To do so, select checkboxes next to the users you want to modify and then choose the needed action from the **Group actions** dropdown.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/group-actions-users.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=0543edfe36a324dff1c5bf38146c58f9" alt="Users settings with the highlighted group actions dropdown" width="2128" height="796" data-path="images/docs/cloud/container-registry/manage-container-registries/group-actions-users.png" />
    </Frame>

    ## Delete a registry

    <Warning>
      **Warning**

      If you delete a Container Registry, you will lose all data stored there. This action can't be reverted.
    </Warning>

    To delete a registry:

    1\. In the Gcore Customer Portal, navigate to **Cloud** > **Container Registries**.

    2\. Find the registry you want to configure and click its name to open it.

    3\. In the top-right corner of the screen, click the **Actions** dropdown and select **Delete**.

    <Frame>
      <img src="https://mintcdn.com/gcore-doc-1256a/AL6TkMd7NPay-uo-/images/docs/cloud/container-registry/manage-container-registries/delete-registry.png?fit=max&auto=format&n=AL6TkMd7NPay-uo-&q=85&s=cb86884526ff5192216d563591c928c4" alt="Container registry page with the highlighed delete button" width="4200" height="1012" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-registry.png" />
    </Frame>

    4\. Type "Delete" to validate your action.

    The registry has been removed.
  </MethodSection>

  <MethodSection id="api" label="REST API">
    Use the Gcore API to inspect and maintain a container registry: resize its storage, browse repositories and artifacts, manage registry users, and remove resources that are no longer needed.

    <Info>
      A permanent [API token](/account-settings/api-tokens) is required, along with a [project ID](https://api.gcore.com/docs/cloud#tag/Projects/operation/ProjectsListV1.get) and [region ID](https://api.gcore.com/docs/cloud#tag/Regions/operation/RegionListV1.get).
    </Info>

    Set the following environment variables before running the examples:

    ```bash theme={null}
    export GCORE_API_KEY="{YOUR_API_KEY}"
    export GCORE_CLOUD_PROJECT_ID="{YOUR_PROJECT_ID}"
    export GCORE_CLOUD_REGION_ID="{YOUR_REGION_ID}"
    export REGISTRY_ID="{YOUR_REGISTRY_ID}"
    ```

    <Info>
      **REGISTRY\_ID** is the numeric ID of an existing container registry. To create a registry or find its ID, see [Create a container registry](/cloud/container-registry/create-container-registry).
    </Info>

    ## Resize storage limit

    This call updates the maximum storage capacity of the registry in GiB.

    | Parameter       | Description              |
    | --------------- | ------------------------ |
    | `storage_limit` | New storage limit in GiB |

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        registry = client.cloud.registries.resize(registry_id=registry_id, storage_limit=20)
        print(f"Storage limit: {registry.storage_limit} GiB")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        registry, err := client.Cloud.Registries.Resize(ctx, registryID, cloud.RegistryResizeParams{
            StorageLimit: gcore.Int(20),
        })
        if err != nil {
            log.Fatal(err)
        }
        fmt.Printf("Storage limit: %d GiB\n", registry.StorageLimit)
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -s -X PATCH \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/resize" \
          -H "Authorization: APIKey $GCORE_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{"storage_limit": 20}'
        ```

        Response:

        ```json theme={null}
        {
          "id": 607,
          "name": "my-registry",
          "storage_limit": 20,
          "storage_used": 0,
          "url": "registry.luxembourg-2.cloud.gcore.dev/1000503-1186668-76-my-registry/",
          "repo_count": 0,
          "created_at": "2026-05-30T21:35:34Z",
          "updated_at": "2026-05-30T22:10:00Z"
        }
        ```
      </Tab>
    </Tabs>

    The [resize](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryResizeHandler.patch) endpoint returns the full registry object, including the updated `storage_limit`.

    ## List repositories

    This call returns all repositories (images) stored in the registry, along with their artifact count and pull statistics.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        repos = client.cloud.registries.repositories.list(registry_id=registry_id)
        print(f"Total repositories: {repos.count}")
        for r in repos.results:
            print(f"  {r.name}  artifacts={r.artifact_count}  pulls={r.pull_count}")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        repos, err := client.Cloud.Registries.Repositories.List(ctx, registryID,
            cloud.RegistryRepositoryListParams{})
        if err != nil {
            log.Fatal(err)
        }
        fmt.Printf("Total repositories: %d\n", repos.Count)
        for _, r := range repos.Results {
            fmt.Printf("  %s  artifacts=%d  pulls=%d\n", r.Name, r.ArtifactCount, r.PullCount)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -s \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/repositories" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```

        Response:

        ```json theme={null}
        {
          "count": 1,
          "results": [
            {
              "id": 42,
              "name": "nginx",
              "artifact_count": 2,
              "pull_count": 5,
              "registry_id": 607,
              "created_at": "2026-05-30T22:00:00Z",
              "updated_at": "2026-05-30T22:05:00Z"
            }
          ]
        }
        ```
      </Tab>
    </Tabs>

    Each [repository](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryRepositoriesHandler.get) object includes the registry ID, artifact count, pull count, and creation timestamp.

    ## List artifacts in a repository

    This call returns all artifacts (image layers) stored in a repository, including their tags and size.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        REPOSITORY_NAME = "nginx"  # repository name from List repositories

        artifacts = client.cloud.registries.artifacts.list(
            registry_id=registry_id,
            repository_name=REPOSITORY_NAME,
        )
        print(f"Total artifacts: {artifacts.count}")
        for a in artifacts.results:
            tags = [t.name for t in (a.tags or [])]
            print(f"  digest={a.digest[:20]}...  size={a.size} bytes  tags={tags}")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        const repoName = "nginx" // repository name from List repositories

        artifacts, err := client.Cloud.Registries.Artifacts.List(ctx, repoName,
            cloud.RegistryArtifactListParams{RegistryID: registryID})
        if err != nil {
            log.Fatal(err)
        }
        fmt.Printf("Total artifacts: %d\n", artifacts.Count)
        for _, a := range artifacts.Results {
            var tags []string
            for _, t := range a.Tags {
                tags = append(tags, t.Name)
            }
            fmt.Printf("  digest=%s...  size=%d bytes  tags=%v\n",
                a.Digest[:20], a.Size, tags)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        REPOSITORY_NAME="nginx"  # repository name from List repositories

        curl -s \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/repositories/$REPOSITORY_NAME/artifacts" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```

        Response:

        ```json theme={null}
        {
          "count": 1,
          "results": [
            {
              "id": 101,
              "digest": "sha256:a3f4e1b2c9...",
              "size": 67108864,
              "tags": [
                {"id": 201, "name": "latest", "artifact_id": 101, "repository_id": 42,
                 "pushed_at": "2026-05-30T22:00:00Z", "pulled_at": "2026-05-30T22:05:00Z"}
              ],
              "registry_id": 607,
              "repository_id": 42,
              "pushed_at": "2026-05-30T22:00:00Z",
              "pulled_at": "2026-05-30T22:05:00Z"
            }
          ]
        }
        ```
      </Tab>
    </Tabs>

    Each [artifact](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryArtifactsHandler.get) object includes the digest, size in bytes, push and pull timestamps, and an array of associated tags.

    ## Delete a tag

    This call removes a single tag from an artifact while keeping the artifact itself intact. Use the `digest` from List artifacts and the tag `name` from the `tags` array.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        REPOSITORY_NAME = "nginx"
        DIGEST   = "sha256:a3f4e1b2c9..."  # artifact digest from List artifacts
        TAG_NAME = "latest"               # tag name from List artifacts

        client.cloud.registries.tags.delete(
            tag_name=TAG_NAME,
            registry_id=registry_id,
            repository_name=REPOSITORY_NAME,
            digest=DIGEST,
        )
        print("Tag deleted.")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        const repoName = "nginx"
        const digest  = "sha256:a3f4e1b2c9..." // artifact digest from List artifacts
        const tagName = "latest"               // tag name from List artifacts

        err = client.Cloud.Registries.Tags.Delete(ctx, tagName,
            cloud.RegistryTagDeleteParams{
                RegistryID:     registryID,
                RepositoryName: repoName,
                Digest:         digest,
            })
        if err != nil {
            log.Fatal(err)
        }
        fmt.Println("Tag deleted.")
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        REPOSITORY_NAME="nginx"
        DIGEST="sha256:a3f4e1b2c9..."   # artifact digest from List artifacts
        TAG_NAME="latest"               # tag name from List artifacts

        curl -s -X DELETE \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/repositories/$REPOSITORY_NAME/artifacts/$DIGEST/tags/$TAG_NAME" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```
      </Tab>
    </Tabs>

    The [delete tag](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryTagHandler.delete) operation returns HTTP 204. To remove all tags together with the artifact, use the Delete an artifact operation instead.

    ## Delete an artifact

    This call permanently removes an artifact and all its tags from the repository. Use the `digest` value from List artifacts.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        REPOSITORY_NAME = "nginx"
        DIGEST = "sha256:a3f4e1b2c9..."  # artifact digest from List artifacts

        client.cloud.registries.artifacts.delete(
            registry_id=registry_id,
            repository_name=REPOSITORY_NAME,
            digest=DIGEST,
        )
        print("Artifact deleted.")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        const repoName = "nginx"
        const digest = "sha256:a3f4e1b2c9..." // artifact digest from List artifacts

        err = client.Cloud.Registries.Artifacts.Delete(ctx, digest,
            cloud.RegistryArtifactDeleteParams{
                RegistryID:     registryID,
                RepositoryName: repoName,
            })
        if err != nil {
            log.Fatal(err)
        }
        fmt.Println("Artifact deleted.")
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        REPOSITORY_NAME="nginx"
        DIGEST="sha256:a3f4e1b2c9..."   # artifact digest from List artifacts

        curl -s -X DELETE \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/repositories/$REPOSITORY_NAME/artifacts/$DIGEST" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```
      </Tab>
    </Tabs>

    The [delete artifact](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryArtifactHandler.delete) operation returns HTTP 204. Deleting an artifact also removes all its tags.

    ## Delete a repository

    This call removes an entire repository and all artifacts it contains.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        REPOSITORY_NAME = "nginx"

        client.cloud.registries.repositories.delete(
            registry_id=registry_id,
            repository_name=REPOSITORY_NAME,
        )
        print("Repository deleted.")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        const repoName = "nginx"

        err = client.Cloud.Registries.Repositories.Delete(ctx, repoName,
            cloud.RegistryRepositoryDeleteParams{RegistryID: registryID})
        if err != nil {
            log.Fatal(err)
        }
        fmt.Println("Repository deleted.")
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        REPOSITORY_NAME="nginx"

        curl -s -X DELETE \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/repositories/$REPOSITORY_NAME" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```
      </Tab>
    </Tabs>

    The [delete repository](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryRepositoryHandler.delete) operation returns HTTP 204. All artifacts and tags in the repository are permanently removed.

    ## Change user permissions

    This call updates whether a user can push images in addition to pulling them. Pass `read_only: true` to restrict the user to pull-only access.

    | Parameter   | Description                                             |
    | ----------- | ------------------------------------------------------- |
    | `duration`  | Credential lifetime in days; `-1` for indefinite access |
    | `read_only` | `true` = pull only; `false` = push and pull             |

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        USER_ID = int(os.environ["USER_ID"])

        updated = client.cloud.registries.users.update(
            user_id=USER_ID,
            registry_id=registry_id,
            duration=-1,
            read_only=True,  # restrict to pull-only
        )
        print(f"read_only: {updated.read_only}")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        updated, err := client.Cloud.Registries.Users.Update(ctx, userID,
            cloud.RegistryUserUpdateParams{
                RegistryID: registryID,
                Duration:   -1,
                ReadOnly:   gcore.Bool(true), // restrict to pull-only
            })
        if err != nil {
            log.Fatal(err)
        }
        fmt.Printf("read_only: %v\n", updated.ReadOnly)
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        USER_ID=730

        curl -s -X PATCH \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/users/$USER_ID" \
          -H "Authorization: APIKey $GCORE_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{"duration": -1, "read_only": true}'
        ```

        Response:

        ```json theme={null}
        {
          "id": 730,
          "name": "r_1000503-1186668-76-my-registry+myuser",
          "read_only": true,
          "duration": -1,
          "expires_at": "1969-12-31T23:59:59Z",
          "created_at": "2026-05-30T21:39:41Z"
        }
        ```
      </Tab>
    </Tabs>

    The [update user](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryUserHandler.patch) endpoint also accepts a `duration` change in the same request, so permissions and expiry can be updated together.

    ## Regenerate user password

    This call generates a new password for a registry user. The new `secret` is returned only in this response — it cannot be retrieved later.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        refreshed = client.cloud.registries.users.refresh_secret(
            registry_id=registry_id,
            user_id=USER_ID,
        )
        print(f"New password: {refreshed.secret}")  # shown once — save it now
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        refreshed, err := client.Cloud.Registries.Users.RefreshSecret(ctx, userID,
            cloud.RegistryUserRefreshSecretParams{RegistryID: registryID})
        if err != nil {
            log.Fatal(err)
        }
        fmt.Printf("New password: %s\n", refreshed.Secret) // shown once — save it now
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        USER_ID=730

        curl -s -X POST \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/users/$USER_ID/refresh_secret" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```

        Response:

        ```json theme={null}
        {
          "id": 730,
          "name": "r_1000503-1186668-76-my-registry+myuser",
          "secret": "T53rmPo1UeuiSiTarDCa2MKj2K6tuiQB",
          "duration": -1,
          "expires_at": "1969-12-31T23:59:59Z",
          "read_only": false,
          "created_at": "2026-05-30T21:39:41Z"
        }
        ```
      </Tab>
    </Tabs>

    The `secret` returned by the [refresh secret](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryRefreshSecretHandler.post) endpoint is shown only once — save it before closing the response. Run `docker login` again with the new password to start a fresh session.

    ## Delete a user

    Removing a user from the registry immediately invalidates any active Docker sessions that were authenticated with that user's credentials.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        client.cloud.registries.users.delete(
            user_id=USER_ID,
            registry_id=registry_id,
        )
        print("User deleted.")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        err = client.Cloud.Registries.Users.Delete(ctx, userID,
            cloud.RegistryUserDeleteParams{RegistryID: registryID})
        if err != nil {
            log.Fatal(err)
        }
        fmt.Println("User deleted.")
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        USER_ID=730

        curl -s -X DELETE \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID/users/$USER_ID" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```
      </Tab>
    </Tabs>

    The [delete user](https://api.gcore.com/docs/cloud#tag/Registry/operation/RegistryUserHandler.delete) endpoint returns HTTP 204. Any active Docker sessions using the deleted user's credentials stop working immediately.

    ## Delete a registry

    Deleting a registry permanently removes all repositories, artifacts, and images stored in it. This action cannot be undone.

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore()

        client.cloud.registries.delete(registry_id=int(os.environ["REGISTRY_ID"]))
        print("Registry deleted.")
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        err := client.Cloud.Registries.Delete(ctx, registryID, cloud.RegistryDeleteParams{})
        if err != nil {
            log.Fatal(err)
        }
        fmt.Println("Registry deleted.")
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -s -X DELETE \
          "https://api.gcore.com/cloud/v1/registries/$GCORE_CLOUD_PROJECT_ID/$GCORE_CLOUD_REGION_ID/$REGISTRY_ID" \
          -H "Authorization: APIKey $GCORE_API_KEY"
        ```
      </Tab>
    </Tabs>
  </MethodSection>
</MethodSwitch>
