Stay organized with collections
Save and categorize content based on your preferences.
You can delete database clusters with the
GDC console or the Distributed Cloud CLI.
Console
From the main menu of the GDC console, choose Database Service.
Select the database cluster to delete.
Click deleteDELETE.
Optional: If backup was previously enabled, select Delete all backups. This results in a permanent deletion. Otherwise, backups will be automatically deleted once the project's retention period expires.
Confirm deletion by typing the cluster's ID.
Click deleteDELETE to finish.
gdcloud CLI
Use the following command to delete a database cluster:
gdclouddatabaseclustersdeleteCLUSTER_NAME
Replace the following:
CLUSTER_NAME with the name of the database cluster to delete.
API
kubectlpatchdbcluster.DBENGINE_NAME.dbadmin.gdc.googDBCLUSTER_NAME-p'{"spec":{"isDeleted": true}}'--type=merge-nUSER_PROJECT
kubectldeletedbcluster.DBENGINE_NAME.dbadmin.gdc.googDBCLUSTER_NAME-nUSER_PROJECT# for database clusters with backup enabled, this will permanently delete the database.
Replace the following variables:
DBENGINE_NAME, the name of the database engine. This is one of alloydbomni, postgresql, or oracle.
USER_PROJECT, the name of the user project where the database cluster was created.
DBCLUSTER_NAME, the name of the database cluster.
For database clusters without backup, only the first step is needed. For databases with backup, running the first command only will delete the database while keeping its backups (and therefore the database cluster is still recoverable). These backups will be deleted after their retention time if no action is taken. The second command can be used to immediately delete the database cluster and all of its backups.
[[["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-08-25 UTC."],[],[],null,["# Delete database clusters\n\nYou can delete database clusters with the\nGDC console or the Distributed Cloud CLI.\n**Note:** When backup is disabled, deleting a database cluster is an irreversible action. When backup is enabled, you have an option in the console to delete a cluster while keeping its backups. This makes the cluster recoverable within your set retention period. \n\n### Console\n\n1. From the main menu of the GDC console, choose **Database Service**.\n2. Select the database cluster to delete.\n3. Click delete **DELETE**.\n4. Optional: If backup was previously enabled, select **Delete all backups**. This results in a permanent deletion. Otherwise, backups will be automatically deleted once the project's retention period expires.\n5. Confirm deletion by typing the cluster's ID.\n6. Click delete **DELETE** to finish.\n\n### gdcloud CLI\n\nUse the following command to delete a database cluster: \n\n gdcloud database clusters delete \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e with the name of the database cluster to delete.\n\n### API\n\n kubectl patch dbcluster.\u003cvar translate=\"no\"\u003eDBENGINE_NAME\u003c/var\u003e.dbadmin.gdc.goog \u003cvar translate=\"no\"\u003eDBCLUSTER_NAME\u003c/var\u003e -p '{\"spec\":{\"isDeleted\": true}}' --type=merge -n \u003cvar translate=\"no\"\u003eUSER_PROJECT\u003c/var\u003e\n kubectl delete dbcluster.\u003cvar translate=\"no\"\u003eDBENGINE_NAME\u003c/var\u003e.dbadmin.gdc.goog \u003cvar translate=\"no\"\u003eDBCLUSTER_NAME\u003c/var\u003e -n \u003cvar translate=\"no\"\u003eUSER_PROJECT\u003c/var\u003e # for database clusters with backup enabled, this will permanently delete the database.\n\nReplace the following variables:\n\n- \u003cvar translate=\"no\"\u003eDBENGINE_NAME\u003c/var\u003e, the name of the database engine. This is one of `alloydbomni`, `postgresql`, or `oracle`.\n- \u003cvar translate=\"no\"\u003eUSER_PROJECT\u003c/var\u003e, the name of the user project where the database cluster was created.\n- \u003cvar translate=\"no\"\u003eDBCLUSTER_NAME\u003c/var\u003e, the name of the database cluster.\n\nFor database clusters without backup, only the first step is needed. For databases with backup, running the first command only will delete the database while keeping its backups (and therefore the database cluster is still recoverable). These backups will be deleted after their retention time if no action is taken. The second command can be used to immediately delete the database cluster and all of its backups."]]