Delete Versions
Use tcb cloudrun version delete to delete specified historical versions of a Cloud Hosting service in batches.
Basic Usage
tcb cloudrun version delete -e <envId> -s <serviceName> --version-names <versionName>
Examples
# Delete one historical version
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001
# Delete multiple versions separated by commas
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001,my-service-002
# Skip confirmation and output JSON
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001 --force --json
# Delete the service and image together when deleting its last version
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001 --is-delete-server true --is-delete-image true --force
Command Parameters
| Parameter | Description | Required |
|---|---|---|
-e, --env-id <envId> | Environment ID | No |
-s, --service-name <serviceName> | Service name. If omitted, it is read from cloudbaserc.json first, then requested interactively | No |
--version-names <versionNames> | Version names to delete, separated by commas. If omitted, they are requested interactively | No |
--is-delete-server <true|false> | Whether to delete the service. Defaults to false and takes effect only when deleting its last version | No |
--is-delete-image <true|false> | Whether to delete the image. Defaults to false and takes effect only when deleting the service | No |
--operator-remark <remark> | Operation remark | No |
--force | Skip confirmation and submit the deletion request directly | No |
--json | Output in JSON format | No |
-h, --help | Display command help | No |
Output
A deletion request may partially succeed. With --json, check data.SuccessVersions and data.FailVersions to confirm the result and failure reason for each version.
Notes
- Deletion cannot be undone.
- Without
--force, the CLI asks for confirmation. - Version deletion restrictions are validated by the service. Failed versions appear in
FailVersions.