Skip to main content

tcb cloudrun version delete

Delete historical versions of a CloudBase Run service in batches.

Usage​

tcb cloudrun version delete -e <envId> -s <serviceName> --version-names <versionName>

Parameters​

ParameterRequiredDescriptionDefault
-e, --env-id <envId>NoEnvironment ID—
-s, --service-name <serviceName>NoService name; reads cloudbaserc.json when omitted, otherwise prompts—
--version-names <versionNames>NoVersion names to delete, comma-separated; prompts when omitted—
--is-delete-server <bool>NoWhether to delete the service, effective only when deleting the last versionfalse
--is-delete-image <bool>NoWhether to delete the image, effective only when deleting the servicefalse
--operator-remark <remark>NoOperator remark—
--forceNoSkip the confirmation and submit the delete requestfalse
--jsonNoOutput JSONfalse

Examples​

# Delete one historical version
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001

# Delete several versions
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 last version together with the service and its image
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001 --is-delete-server true --is-delete-image true --force

Output​

A delete request can partially succeed. With --json, check data.SuccessVersions and data.FailVersions for the result and failure reason of each version.

Notes​

  • Deletion is irreversible
  • Without --force the CLI asks for confirmation
  • Version deletion limits are enforced by the server; failed versions appear in FailVersions