destroy
Destroy a deployment and remove all associated resources.
Usage
onvera destroy <deployment_id> [--force]Arguments
<deployment_id>- Deployment ID to destroy
Flags
--force- Skip confirmation prompt
Description
The destroy command initiates destruction of a deployment. This operation:
- Revokes user access
- Removes database tenant
- Tears down infrastructure resources
- Deletes the deployment record
Destruction is processed asynchronously. The command polls for completion and exits when destruction succeeds or fails.
This operation is irreversible. All data and resources associated with the deployment will be permanently deleted.
Examples
Destroy with confirmation:
onvera destroy dep_550e8400-e29b-41d4-a716-446655440000Destroy without confirmation:
onvera destroy dep_550e8400-e29b-41d4-a716-446655440000 --forceOutput
Confirmation prompt:
Are you sure you want to destroy deployment dep_550e8400-e29b-41d4-a716-446655440000? (y/N): During destruction:
Destroying deployment dep_550e8400-e29b-41d4-a716-446655440000...
Operation ID: op_770e8400-e29b-41d4-a716-446655440002
Polling for completion...
Press Ctrl+C to stop polling (destruction will continue)
Status: revoking_access - Revoking user access (15s elapsed)
Status: removing_db_tenant - Removing database tenant (45s elapsed)
Status: tearing_down_infra - Tearing down infrastructure (2m 14s elapsed)
Status: succeeded - Destruction complete (3m 32s elapsed)
Destruction succeeded!Interrupting Polling
You can press Ctrl+C to stop polling. The destruction continues in the background. Use the Operation ID to check status later:
onvera ops get op_770e8400-e29b-41d4-a716-446655440002Common Failure Modes
Not authenticated
Error:
not authenticated. Run 'onvera auth login' firstSolution: Run onvera auth login to authenticate.
Deployment not found
Error:
API error: Deployment not foundSolution: Verify the deployment ID is correct and that you have access to it.
Destruction fails
If destruction fails, check the operation status:
onvera ops get <operation_id>The operation will include error details in the progress message.