Out Plane
db

db delete

Permanently destroy a database.

destructive--dry-run

Destroys the instance and everything inside it. There is no snapshot and no retention window, so take a dump first if the data matters.

Applications keep whatever connection string they were given. Nothing here updates them, and they fail on their next connection.

Usage

outplane db delete <DATABASE> [flags]

Arguments

ArgumentTypeDescription
DATABASEstringDatabase name or id. Required.

Flags

FlagTypeDescription
-y, --yesboolAcknowledge the deletion. Not sufficient on its own.
--confirm-namestringThe database's name, typed again.

The global flags apply as well.

Output

FieldTypeDescription
idstring
namestring
statusstringOnly active accepts connections. provisioning means the provider has not finished. One of provisioning, active, failed, deleting.
versionstringPostgreSQL major version.
regionstringFixed at creation.
sizestring | nullThe provider's compute unit, such as 0.25-1. Not a platform instance code.
createdAtstring | nullRFC 3339, UTC.
changedbool

Examples

See what would go

outplane db delete orders --dry-run

Check what the name resolves to first

outplane db delete orders --dry-run --json --fields db,dbId

The confirmed form

outplane db delete orders --yes --confirm-name orders

What to Know

  • Never prompts. Without confirmation it exits 4 and returns the command to replay in the error's confirm_command field.
  • Under a detected agent harness it exits 4 even with both flags.
  • Applications keep whatever connection string they were given. Nothing here updates them, and they will fail on their next connection.
  • Irreversible. Take a dump first if the data matters.

Errors

Beyond 0 for success, this command exits with:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
4confirmation_requiredA destructive operation stopped. Replay the command in confirm_command.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe Out Plane API returned a server error.

The code on the error object is one of confirmation.required, db.confirm_name_mismatch, db.not_found. Branch on that, or on the exit status. The message is prose and changes.

On this page