The Lakehouse runtime catalog lets you delete
[catalog endpoints](https://docs.cloud.google.com/lakehouse/docs/about-lakehouse-catalogs.md.txt#configuration) to
unregister their metadata management endpoints in
borderless Lakehouse.

Deleting a catalog endpoint removes it from Lakehouse, but
it doesn't automatically delete the underlying Cloud Storage bucket or your
stored data files. You can't delete a catalog endpoint that still contains
namespaces or tables.

## Before you begin

1. Read [About the Lakehouse runtime catalog](https://docs.cloud.google.com/lakehouse/docs/about-lakehouse-catalogs.md.txt) to understand how the Lakehouse runtime catalog works and the limitations for the service.

### Required roles


To get the permissions that
you need to delete a catalog,

ask your administrator to grant you the
following IAM roles on your project:

- All:
  - [BigLake Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/biglake.md.txt#biglake.admin) (`roles/biglake.admin`)
  - [Storage Admin](https://docs.cloud.google.com/iam/docs/roles-permissions/storage.md.txt#storage.admin) (`roles/storage.admin`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


You might also be able to get
the required permissions through [custom
roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles) or other [predefined
roles](https://docs.cloud.google.com/iam/docs/roles-overview#predefined).

## Delete a catalog

Delete a catalog endpoint.

### Console

1. In the Google Cloud console, open the **Lakehouse** page.

   [Go to Lakehouse](https://console.cloud.google.com/biglake)
2. In the row of the catalog that you're deleting, click

   **More catalog actions \> Delete**.

3. In the delete dialog, enter `DELETE` and click **Delete**.

### gcloud

To delete a catalog using `gcloud`, run the [`gcloud biglake iceberg catalogs delete` command](https://docs.cloud.google.com/sdk/gcloud/reference/biglake/iceberg/catalogs/delete).

```bash
gcloud biglake iceberg catalogs delete CATALOG_ID \
    --project="PROJECT_ID"
```

Replace the following:

- `CATALOG_ID`: the ID of your catalog.
- `PROJECT_ID`: your Google Cloud project ID.

### REST

To delete a catalog management endpoint using the REST API, make a `DELETE`
request to the [`DeleteIcebergCatalog`](https://docs.cloud.google.com/lakehouse/docs/reference/rest/v1/iceberg.v1.restcatalog.extensions.projects.catalogs/delete.md.txt) endpoint:

```restructuredtext
DELETE /iceberg/v1/restcatalog/extensions/projects/PROJECT_ID/catalogs/CATALOG_ID
```

> [!NOTE]
> **Note:** You cannot delete a catalog that still contains namespaces or tables.

Replace the following:

- `PROJECT_ID`: your Google Cloud project ID.
- `CATALOG_ID`: the ID of your catalog.