Skip to main content

tcb hosting delete

Deletes the given file or directory from the static website. Without cloudPath, every file is deleted.

Usage​

tcb hosting delete [cloudPath] [options]

Options​

OptionRequiredDescriptionDefault
<cloudPath>NoCloud file or directory path; deleting everything when omitted—
-e, --env-id <envId>YesEnvironment ID—
--dirNoTreat the target as a directory and delete it recursively—
--forceNoSkip the confirmation prompt—
--dry-runNoPreview the files to delete without deleting them—

Examples​

# Delete index.html in the root
tcb hosting delete index.html -e envId

# Delete the static directory and everything under it
tcb hosting delete static --dir -e envId

# Preview the files that would be deleted
tcb hosting delete static --dir --dry-run -e envId

# Skip the confirmation prompt
tcb hosting delete static --dir --force -e envId

# Empty the whole static website
tcb hosting delete -e envId

Notes​

  • Omitting cloudPath empties the whole static website; run --dry-run first to confirm the file list
  • Deletion is irreversible, so a mistaken delete requires a redeploy