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
| Option | Required | Description | Default |
|---|---|---|---|
<cloudPath> | No | Cloud file or directory path; deleting everything when omitted | — |
-e, --env-id <envId> | Yes | Environment ID | — |
--dir | No | Treat the target as a directory and delete it recursively | — |
--force | No | Skip the confirmation prompt | — |
--dry-run | No | Preview 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
cloudPathempties the whole static website; run--dry-runfirst to confirm the file list - Deletion is irreversible, so a mistaken delete requires a redeploy