gb destroy
Delete a Genbox environment.
Synopsis
gb destroy [name] [options]
gb delete [name] [options]Description
Permanently destroys a Genbox environment, releasing all cloud resources. This action cannot be undone.
Arguments
| Argument | Description |
|---|---|
name | Optional. Environment name. If not provided, uses the current/default environment or prompts for selection. |
Options
| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
--force | Force destroy even if environment is in error state |
Examples
Basic Destroy
# Destroy specific environment
gb destroy feature-auth
# Destroy with confirmation skip
gb destroy feature-auth -yInteractive Selection
# Will prompt to select from your environments
gb destroyForce Destroy
# Force destroy stuck environment
gb destroy feature-auth --force -yConfirmation
Without -y, you’ll see a confirmation prompt:
Are you sure you want to destroy 'feature-auth'?
This will permanently delete:
• Server and all data
• Database contents
• Service URLs
This action cannot be undone.
Type 'feature-auth' to confirm: _What Gets Deleted
- Cloud server instance
- All cloned repositories
- Local database data
- Redis cache data
- Service configurations
- HTTPS endpoints
What’s Preserved
- Your local code (not affected)
- Backups created with
gb backup - Snapshots created before destroy
Notes
- Stopped environments still consume storage (destroy to free completely)
- Consider
gb stopif you want to resume later - Auto-destroy happens after 58 minutes of inactivity
See Also
Last updated on