How to delete a Managed Postgres Cluster?

Attempting to delete a Fly.io Managed Postgres Cluster through the CLI.

Tried following this tutorial: Delete a Postgres Cluster · Fly Docs .

However, it looks like that doc explains how to delete an App (of which I have 0 of).

So when I run: fly apps destroy <cluster_name>

I am given the following error:

jake@Jakes-MacBook-Pro-2023 ~ % fly apps destroy gems-db-dev 
Destroying an app is not reversible.
? Destroy app gems-db-dev? Yes
Error: failed to run query ($appName: String!) { app(name: $appName) { id internalNumericId name hostname deployed status version appUrl platformVersion currentRelease { evaluationId status inProgress version } config { definition } organization { id slug paidPlan } services { description protocol internalPort ports { port handlers } } ipAddresses { nodes { id address type createdAt } } sharedIpAddress cnameTarget imageDetails { registry repository tag digest version } machines{ nodes { id name config state region createdAt app { name } ips { nodes { family kind ip maskSize } } host { id } } } postgresAppRole: role { name } limitedAccessTokens { nodes { id name expiresAt } } } }: Could not find App "gems-db-dev"

Any advice appreciated. Thank you!

Ah that doc is for the older, self-run postgres. We’ll make note to make that clearer.

You’re looking for fly mpg destroy · Fly Docs you’ll need the ID which you can get from fly mpg list

1 Like

Ah perfect. That worked wonderfully! Looking forward to the doc updates!

Thanks for the very very quick response. Very much appreciated.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.