hangar delete
Permanently delete a Hangar and its disk.
Removes a Hangar together with its disk and everything on it. There is no undelete and no retention window, so work that should outlive the Hangar has to be pushed somewhere first.
Like every deletion it never prompts. It stops, hands back the exact command that would proceed, and leaves the decision to whoever is allowed to make it. The Hangar's own name has to be typed again. Deleting frees the name, for a new Hangar or an application.
Usage
outplane hangar delete <HANGAR> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
HANGAR | string | Hangar name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
-y, --yes | bool | Acknowledge the deletion. Not sufficient on its own. |
--confirm-name | string | The Hangar's name, typed again. Required, because a single --force is too easy for an agent to emit by accident. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
deleted | bool | False for a dry run. |
hangar | string | The Hangar's immutable name. |
hangarId | string |
Examples
Confirm which Hangar the name resolves to, before confirming anything
outplane hangar delete myhangar --dry-run --json{
"deleted": false,
"hangar": "myhangar"
}Request deletion. Returns exit 4 with a command to replay
outplane hangar delete myhangarThe confirmed form, which a human approves
outplane hangar delete myhangar --yes --confirm-name myhangarWhat to Know
- This command never prompts. Without confirmation it exits 4 and returns the exact command to replay in the error's confirm_command field.
- Exit 4 is not a failure. It means the confirmation belongs to somebody else.
- Under a detected agent harness it exits 4 even when --yes and --confirm-name are supplied. A flag is not a safety boundary, because an agent that read this note can emit any flag in it; the harness's own approval step is the gate.
- The disk is deleted with the Hangar. Work that exists only there, uncommitted or unpushed, is gone with it.
- Nothing stops a deletion: a running Hangar, one with people connected to its session and one that failed to start are all deleted the same way.
- --confirm-name is matched against the immutable name, not the display name.
- Deleting frees the name, for a new Hangar or a new application.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
4 | confirmation_required | A destructive operation stopped. Replay the command in confirm_command. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of confirmation.required, hangar.confirm_name_mismatch, hangar.not_found, hangar.ambiguous, usage.missing_argument, usage.empty_argument. Branch on that, or on the exit status. The message is prose and changes.