> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gcore.com/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).map(c => {
    if (!c || !c.props) return null;
    if (c.props.id) return c;
    const inner = c.props.children;
    if (inner && inner.props && inner.props.id) return inner;
    return null;
  }).filter(Boolean);
  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 (_) {}
    window.dispatchEvent(new Event("scroll"));
  }, [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">
    <p>All created registries appear on the **Container Registry** page in the [Gcore Customer Portal](https://portal.gcore.com). Storage limit, users, and images can be managed from this page. A search bar is available to filter registries by name.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/container-registry-page.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=e846cd27562b06da2f9f433897587fbc" alt="Container Registry page listing registries with storage usage, endpoint, and creation date" width="1090" height="394" data-path="images/docs/cloud/container-registry/manage-container-registries/container-registry-page.png" />
    </Frame>

    ## Change storage limit

    <p>The storage limit can be increased to host more images or reduced to lower storage usage.</p>

    <Steps>
      <Step title="Open the registry menu">
        In the Customer Portal, navigate to **Cloud** > **Container Registry**. Find the registry and click the three-dot icon next to it.
      </Step>

      <Step title="Select Change storage limit">
        Select **Change storage limit** from the dropdown.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/container-registry-change-limit.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=20b754ace06d8588b7c0a5f12aa77b63" alt="Container Registry list with three-dot menu showing Overview, Change storage limit, Pull commands, Push commands, and Delete options" width="1085" height="504" data-path="images/docs/cloud/container-registry/manage-container-registries/container-registry-change-limit.png" />
        </Frame>
      </Step>

      <Step title="Enter a new limit">
        Enter a new limit in GiB and click **Save**.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/set-new-storage-limit.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=351790738714cc6fa21b688e6f4d0a38" alt="Change Container Registry storage limit dialog with a storage limit field in GiB and a Save button" width="584" height="411" data-path="images/docs/cloud/container-registry/manage-container-registries/set-new-storage-limit.png" />
        </Frame>
      </Step>
    </Steps>

    ## Manage images

    <p>Open the **Images** tab to view all images stored in the registry. The table shows the image name, artifact count, pull count, and last modified date. Use the search bar to find a specific image or the **Group actions** dropdown to apply bulk operations.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/images-tab-cropped.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=f4a559dc539bb0445d78865a6e796de8" alt="Images tab showing the nginx image with one artifact, zero pulls, and a last modified date" width="1087" height="666" data-path="images/docs/cloud/container-registry/manage-container-registries/images-tab-cropped.png" />
    </Frame>

    ### View and manage image artifacts

    <p>Click an image name to open the **Artifacts** page. It shows each artifact's digest, tags, size, and the last pull and push timestamps. A search bar is available to filter artifacts.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/image-artifacts.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=e7a9e3e9bd0540432548a61e1b761da8" alt="Artifacts page for the nginx image listing a sha256 digest with the alpine tag, size, and push timestamp" width="1088" height="449" data-path="images/docs/cloud/container-registry/manage-container-registries/image-artifacts.png" />
    </Frame>

    <p>To delete an artifact or remove a tag, click the three-dot icon next to the artifact and select **Delete** to remove the artifact and all its tags, or **Delete tags** to remove individual tags.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/delete-image-artifact.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=13071c378c27beaaa2a30e9ec4366015" alt="Artifact row with three-dot menu open showing Delete and Delete tags options" width="1087" height="464" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-image-artifact.png" />
    </Frame>

    <p>To apply actions to multiple artifacts at once, select the checkboxes next to the relevant artifacts and select the action from the **Group actions** dropdown.</p>

    ### Delete an image

    <p>Deleting an image removes it and all associated artifacts from the registry.</p>

    <Steps>
      <Step title="Open the image menu">
        On the **Images** tab, find the image and click the three-dot icon next to it.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/delete-image.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=1f5db3f291594662015f85932351811b" alt="Images tab with three-dot menu open for the nginx image showing a Delete option" width="1087" height="668" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-image.png" />
        </Frame>
      </Step>

      <Step title="Select Delete">
        Select **Delete** from the dropdown.
      </Step>

      <Step title="Confirm deletion">
        Click **Delete Image** to confirm.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/confirm-image-deletion.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=675f76b7d7919d42f663b5d766c1fbb6" alt="Delete Image confirmation dialog asking whether to delete the nginx image" width="554" height="279" data-path="images/docs/cloud/container-registry/manage-container-registries/confirm-image-deletion.png" />
        </Frame>
      </Step>
    </Steps>

    ### Delete multiple images

    <p>To delete multiple images at once, select the checkboxes next to the target images, then select **Delete** from the **Group actions** dropdown.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/image-group-actions.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=557b481d9b951b03f89c9ac5aa34ac72" alt="Images tab with one image selected showing the Group actions dropdown with a Delete option" width="1088" height="667" data-path="images/docs/cloud/container-registry/manage-container-registries/image-group-actions.png" />
    </Frame>

    ## Manage users

    <p>Open the **Users** tab to view all users with access to the registry. The table shows the username, permissions, creation date, and expiration date when set. Users are added during [registry creation](/cloud/container-registry/create-container-registry).</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/users-tab.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=86829706492ebe82c2b6c242007f4fb6" alt="Users tab showing three users with their permission levels, creation dates, and expiration dates" width="1086" height="734" data-path="images/docs/cloud/container-registry/manage-container-registries/users-tab.png" />
    </Frame>

    <p>Two permission levels are available:</p>

    * **Pull images**: restricts the user to pull-only access, preventing unauthorized changes to the registry.
    * **Push and pull images**: grants full access — the user can pull and push images.

    ### Change user permissions

    <p>To update the access level for a user:</p>

    <Steps>
      <Step title="Open the user menu">
        On the **Users** tab, find the user and click the three-dot icon next to it.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/change-user-permissions.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=a095452cca0b82b638113463f0b695e7" alt="Users table with three-dot menu open showing Reset password, Change permissions, and Delete options" width="1098" height="734" data-path="images/docs/cloud/container-registry/manage-container-registries/change-user-permissions.png" />
        </Frame>
      </Step>

      <Step title="Select Change permissions">
        Select **Change permissions** from the dropdown.
      </Step>

      <Step title="Update and save">
        Select the new permission level and click **Save**.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/select-new-user-permissions.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=603d24f8d597237ac456c4f75496bce4" alt="Change permissions dialog with a username field and permissions dropdown set to Push and pull images" width="994" height="342" data-path="images/docs/cloud/container-registry/manage-container-registries/select-new-user-permissions.png" />
        </Frame>
      </Step>
    </Steps>

    ### Reset user password

    <p>A user password is generated automatically during creation. To replace it with a new one:</p>

    <Steps>
      <Step title="Open the user menu">
        On the **Users** tab, find the user and click the three-dot icon next to it.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/reset-user-password.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=132be1541f9beb6041e674bbf20d61a7" alt="Users table with three-dot menu open showing Reset password, Change permissions, and Delete options" width="1090" height="735" data-path="images/docs/cloud/container-registry/manage-container-registries/reset-user-password.png" />
        </Frame>
      </Step>

      <Step title="Select Reset password">
        Select **Reset password** from the dropdown.
      </Step>

      <Step title="Confirm the reset">
        Click **Confirm** to generate a new password.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/confirm-password-reset.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=40f97c599e4145a4252c3789c399b3d3" alt="Warning dialog stating the existing password will be replaced, with Confirm and Cancel buttons" width="565" height="290" data-path="images/docs/cloud/container-registry/manage-container-registries/confirm-password-reset.png" />
        </Frame>
      </Step>

      <Step title="Save the new password">
        Copy and save the new password — it cannot be retrieved after this step.
      </Step>
    </Steps>

    ### Delete a user

    <p>Deleting a user immediately invalidates any active Docker sessions authenticated with that user's credentials.</p>

    <Steps>
      <Step title="Open the user menu">
        On the **Users** tab, find the user and click the three-dot icon next to it.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/delete-user.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=c0fa9af8da300549f0c3deedae1c16f9" alt="Users table with three-dot menu open showing Reset password, Change permissions, and Delete options" width="1094" height="735" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-user.png" />
        </Frame>
      </Step>

      <Step title="Select Delete">
        Select **Delete** from the dropdown.
      </Step>

      <Step title="Confirm deletion">
        Click **Delete user** to confirm.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/confirm-user-deletion.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=db05203467f3904523d43430b4177539" alt="Delete user confirmation dialog asking whether to delete the selected user" width="586" height="331" data-path="images/docs/cloud/container-registry/manage-container-registries/confirm-user-deletion.png" />
        </Frame>
      </Step>
    </Steps>

    ### Manage multiple users with group actions

    <p>To delete multiple users or change their permissions simultaneously, select the checkboxes next to the target users and select the action from the **Group actions** dropdown.</p>

    <Frame>
      <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/group-actions-users.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=705f300c43e597af54d7e771860a7a2c" alt="Users tab with one user selected showing Group actions dropdown with Change permissions and Delete options" width="1088" height="736" data-path="images/docs/cloud/container-registry/manage-container-registries/group-actions-users.png" />
    </Frame>

    ## Delete a registry

    <p>Deleting a registry removes it from the Customer Portal and prevents access to all images stored in it.</p>

    <Warning>
      This action permanently removes all data stored in the registry and cannot be undone.
    </Warning>

    <Steps>
      <Step title="Open the registry menu">
        In the Customer Portal, navigate to **Cloud** > **Container Registry**. Find the registry and click the three-dot icon next to it.
      </Step>

      <Step title="Select Delete">
        Select **Delete** from the dropdown.

        <Frame>
          <img src="https://mintcdn.com/gcore/oxS_nLcLtEBfgfBM/images/docs/cloud/container-registry/manage-container-registries/delete-registry.png?fit=max&auto=format&n=oxS_nLcLtEBfgfBM&q=85&s=291b76b8907851094c6a2ba9e1bb5fcc" alt="Container Registry list with three-dot menu showing Overview, Change storage limit, Pull commands, Push commands, and Delete options" width="1084" height="519" data-path="images/docs/cloud/container-registry/manage-container-registries/delete-registry.png" />
        </Frame>
      </Step>

      <Step title="Confirm deletion">
        Click **Delete Container Registry** to confirm.
      </Step>
    </Steps>
  </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>
      An [API token](/account-settings/api-tokens) is required, along with a [project ID](/api-reference/cloud/projects/list-projects) and [region ID](/api-reference/cloud/regions/list-regions).
    </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](/api-reference/cloud/registry/resize-registry) 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](/api-reference/cloud/registry/list-registry-repositories) 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](/api-reference/cloud/registry/list-registry-artifacts) 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](/api-reference/cloud/registry/delete-registry-tag) 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](/api-reference/cloud/registry/delete-registry-artifact) 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](/api-reference/cloud/registry/delete-registry-repository) 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](/api-reference/cloud/registry/update-registry-user) 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](/api-reference/cloud/registry/refresh-registry-user-secret) 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](/api-reference/cloud/registry/delete-registry-user) 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>
