Stay organized with collections
Save and categorize content based on your preferences.
Deleting a schema registry is an irreversible action. All subjects, schemas,
and versions contained within the registry are permanently deleted.
Ensure that no active Kafka clients rely on this registry before proceeding.
This predefined role contains
the permissions required to delete a schema registry. To see the exact permissions that are
required, expand the Required permissions section:
Required permissions
The following permissions are required to delete a schema registry:
Grant the following permission on the schema registry:
managedkafka.schemaRegistries.delete
Grant the following permission for console users to list schema registries:
managedkafka.schemaRegistries.list
Grant the following permission for console users to get schema registry details:
managedkafka.schemaRegistries.get
PROJECT_ID (required): your Google Cloud project ID.
SCHEMA_REGISTRY_ID (required): the ID of the
schema registry you want to delete.
LOCATION (required): the Google Cloud
region where the schema registry is located.
If the request is successful and the schema registry is deleted, the API
typically returns a 200 OK status code with an empty JSON body
indicating the completion of a long-running operation or the operation
resource itself.
If the specified schema registry does not exist, you receive a
404 Not Found error.
If you lack permissions, you receive
a 403 Forbidden error.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Delete a schema registry\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nDeleting a schema registry is an irreversible action. All subjects, schemas,\nand versions contained within the registry are permanently deleted.\nEnsure that no active Kafka clients rely on this registry before proceeding.\n\nRequired roles and permissions\n------------------------------\n\n\nTo get the permissions that\nyou need to delete a schema registry,\n\nask your administrator to grant you the\n\n\n[Managed Kafka Schema Registry Editor](/iam/docs/roles-permissions/managedkafka#managedkafka.schemaRegistryEditor) (`roles/managedkafka.schemaRegistryEditor`)\nIAM role on the schema registry instance.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nThis predefined role contains\n\nthe permissions required to delete a schema registry. To see the exact permissions that are\nrequired, expand the **Required permissions** section:\n\n\n#### Required permissions\n\nThe following permissions are required to delete a schema registry:\n\n- Grant the following permission on the schema registry: ` ``managedkafka.schemaRegistries.delete`\n- Grant the following permission for console users to list schema registries: ` ``managedkafka.schemaRegistries.list`\n- Grant the following permission for console users to get schema registry details: ` ``managedkafka.schemaRegistries.get`\n\n\nYou might also be able to get\nthese permissions\nwith [custom roles](/iam/docs/creating-custom-roles) or\nother [predefined roles](/iam/docs/roles-overview#predefined).\n\nThe higher-level **Managed Kafka Schema Registry Admin**\n(`roles/managedkafka.schemaRegistryAdmin`) role also includes\nthese permissions.\n\nFor more information about the predefined roles available for\nManaged Service for Apache Kafka, see the\n[Access control documentation](/managed-service-for-apache-kafka/docs/access-control#predefined-roles).\n\nDelete a schema registry\n------------------------\n\nTo permanently delete a schema registry and all its contents, follow these steps: \n\n### Console\n\n1. In the Google Cloud console, go to the **Schema registries** page.\n\n [Go to schema registries](https://console.cloud.google.com/managedkafka/schemaRegistries)\n\n A list of schema registries in your project is displayed.\n2. Click the name of the schema registry that you want to delete.\n3. On the **Schema registry details** page, click the **Delete** button.\n4. Confirm the deletion when prompted.\n\n### gcloud\n\n1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n2. Use the `gcloud beta managed-kafka schema-registries delete` command:\n\n ```bash\n gcloud beta managed-kafka schema-registries delete SCHEMA_REGISTRY_ID \\\n --location=LOCATION \\\n ```\n\n \u003cbr /\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eSCHEMA_REGISTRY_ID\u003c/var\u003e (required): the ID of the schema registry you want to delete.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e (required): the Google Cloud region where the schema registry is located.\n\nFor example---to delete a schema registry named `testRegistry`\nin the `us-central1` region, run the following command: \n\n```bash\ngcloud beta managed-kafka schema-registries delete testRegistry \\\n --location=us-central1\n```\n\n### API\n\nMake a `DELETE` request to the specific resource URI of the\nschema registry you want to delete.\n\n\u003cbr /\u003e\n\n```\nDELETE https://managedkafka.googleapis.com/v1main/projects/PROJECT_ID/locations/LOCATION/schemaRegistries/SCHEMA_REGISTRY_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e (required): your Google Cloud project ID.\n- \u003cvar translate=\"no\"\u003eSCHEMA_REGISTRY_ID\u003c/var\u003e (required): the ID of the schema registry you want to delete.\n- \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e (required): the Google Cloud region where the schema registry is located.\n\nIf the request is successful and the schema registry is deleted, the API\ntypically returns a `200 OK` status code with an empty JSON body\nindicating the completion of a long-running operation or the operation\nresource itself.\n\nIf the specified schema registry does not exist, you receive a\n`404 Not Found` error.\n\nIf you lack permissions, you receive\na `403 Forbidden` error.\n\n\u003cbr /\u003e\n\nWhat's next?\n------------\n\n- [Update compatibility type](/managed-service-for-apache-kafka/docs/schema-registry/update-compatibility-type)\n\n- [Update schema mode](/managed-service-for-apache-kafka/docs/schema-registry/update-schema-mode)\n\n- [View details of a schema registry](/managed-service-for-apache-kafka/docs/schema-registry/view-schema-registry)\n\n*Apache Kafka® is a registered trademark of The Apache Software Foundation or its affiliates in the United States and/or other countries.*"]]