tcb env delete
Destroys a CloudBase environment and every resource in it. The operation cannot be undone.
Usage
tcb env delete [options] -e <envId>
Flags
| Flag | Required | Description | Default |
|---|---|---|---|
-e, --env-id <envId> | Yes | Environment ID | — |
--dry-run | No | Simulate the run, showing the environment and what would be affected without destroying anything | — |
--yes | No | Skips confirmation prompts | — |
--platform-id <platformId> | No | Platform edition resource pool ID, destroys an environment inside that pool | — |
Example
# Preview what destruction affects
tcb env delete -e my-env-id --dry-run
# Destroy after confirming
tcb env delete -e my-env-id --yes
# Destroy an environment in a platform edition pool (v3.8.3+)
tcb env delete --platform-id <platformId> -e my-env-id --yes
⚠️ Destruction removes cloud functions, databases, storage and every other resource in the environment, with no way back. Run
--dry-runfirst to confirm the scope.
With --platform-id only the target environment in the pool is destroyed, the pool itself and the other environments are not affected.
Related commands
- Create an environment
- Change package
- Resource configuration: check the resources before destroying