Skip to main content
Permanently deletes a service. To confirm, you type the service’s ID back, not just y.
Deletion can’t be undone, and any backup not already taken is lost. Take a backup first if you might need the data: see sabaoth backup create.

Arguments

string
required
The ID of the service to delete, for example clu_abc.

Flags

boolean
default:"false"
Skip the confirmation prompt. Required when there’s no terminal. The organization check described below still happens.
string
Organization the service belongs to, instead of the selected one.
boolean
default:"false"
Print the result as JSON on stdout.

Examples

Confirmation

The CLI first looks up the service, then shows its name and ID and asks you to type the ID:
Anything other than the exact ID, including just pressing Enter, cancels with DECLINED (exit 2) and nothing is deleted. Typing the ID confirms you have the right service, not just that you meant to press a key. With an irreversible action, the bigger risk is looking at the wrong resource. There is no dry-run mode and no waiting period. Typing the ID is the safeguard.

Output

With --json:
Deletion happens in the background. The service may still show up for a short while, with a deleting status. accepted: true means the API took the request, not that the service is already gone.

Behavior

  • The service is always read first, even with --yes. This gets the name for the prompt, and makes sure the service is in the effective organization. An API key can sometimes reach services in several organizations, and --yes must never become a way to delete outside the one you’re working in.
  • A service in another organization is reported as CLUSTER_NOT_FOUND, the same as one that doesn’t exist, and nothing is deleted.
  • If the API returns the service without an organization, the CLI refuses with ORGANIZATION_SCOPE_UNVERIFIABLE rather than guessing.

If the result is unknown

If the delete request was sent but no response came back, the service may or may not have been deleted. The CLI never retries. It fails with UNKNOWN_MUTATION_OUTCOME and asks you to run sabaoth postgres get <service-id> to check.

Errors