- How-Tos
- Manage Cluster
- Destroy Database Clusters
For AI agents: The documentation index is at https://docs.digitalocean.com/llms.txt. Markdown versions of pages use the same URL with
index.html.mdin place of the HTML page (for example, appendindex.html.mdto the directory path instead of opening the HTML document).
How to Destroy PostgreSQL Database Clusters
Last verified 31 Jul 2026
PostgreSQL is an open source, object-relational database built for extensibility, data integrity, and speed. Its concurrency support makes it fully ACID-compliant, and it supports dynamic loading and catalog-driven operations to let users customize its data types, functions, and more.
Deleting a database cluster permanently and irreversibly destroys the cluster, its contents, and its automated backups.
Destroy a Database Cluster Using Automation
You can destroy a database cluster using the DigitalOcean CLI (doctl) or the API.
Destroy a Database Cluster via CLI
How to Create a Database Using the DigitalOcean CLI-
Install
doctl, the official DigitalOcean CLI. -
Create a personal access token and save it for use with
doctl. -
Use the token to grant
doctlaccess to your DigitalOcean account.doctl auth init -
Finally, run
doctl databases delete. Basic usage looks like this, but you can read the usage docs for more details:doctl databases delete <database-cluster-id> [flags]The following example deletes the database cluster with the ID
f81d4fae-7dec-11d0-a765-00a0c91e6bf6:doctl databases delete f81d4fae-7dec-11d0-a765-00a0c91e6bf6
Destroy a Database Cluster via API
How to Destroy a Database Cluster Using the DigitalOcean APICreate a personal access token and save it for use with the API.
cURL
Send a DELETE request to https://api.digitalocean.com/v2/databases/{database_cluster_uuid}.
Using cURL:
curl -X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
"https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" Go
Using Godo, the official DigitalOcean API client for Go:
import (
"context"
"github.com/digitalocean/godo"
)
func main() {
pat := "mytoken"
client := godo.NewFromToken(pat)
ctx := context.TODO()
_, err := client.Databases.Delete(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30")
}Python
Using PyDo, the official DigitalOcean API client for Python:
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
delete_resp = client.databases.destroy_cluster(database_cluster_uuid="a7abba8")Destroy a Database Cluster Using the Control Panel
To destroy a database cluster from the control panel, open the cluster’s More menu. Click Destroy to go to the cluster’s Settings page.
[Screenshot of cluster settings page]
In the Destroy this database cluster section at the bottom of the page, click the Destroy button. This opens a Destroy database cluster confirmation window.
[Screenshot of the destroy cluster warning]
To permanently destroy the cluster, type or copy and paste the name of the database cluster into the text field, then click Destroy.
WarningDestroying a database cluster destroys the backups of that database. Make sure you download any important data before you destroy a cluster.