Deleting a Sharded PostgreSQL cluster
Written by
Updated at July 8, 2026
You can delete an Sharded PostgreSQL cluster if you no longer need it.
Deleting a cluster
Before deleting a cluster, disable its deletion protection if it is enabled.
Management console
REST API
gRPC API
- In the management console
, select the folder where you want to delete a cluster. - Navigate to Yandex Managed Service for Sharded PostgreSQL.
- Click
for the cluster in question and select Delete. - In the window that opens, confirm the deletion and click Delete.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Use the Cluster.Delete method and send the following request, e.g., via cURL
:curl \ --request DELETE \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://mdb.api.cloud.yandex.net/managed-spqr/v1/clusters/<cluster_ID>' -
View the server response to make sure your request was successful.
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the ClusterService.Delete method, e.g., via the following gRPCurl
request:grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/mdb/spqr/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": <cluster_ID> }' \ mdb.api.cloud.yandex.net:443 \ yandex.cloud.mdb.spqr.v1.ClusterService.Delete -
Check the server response to make sure your request was successful.