destroy

Tear down an instance completely. Unregisters webhooks, stops sandboxes, deletes snapshots, removes the Vercel project, and cleans up local files.

Usage

clawrun destroy <instance> [--yes]

Alias: clawrun rm

Remove an instance and all its associated resources. This action cannot be undone.

Arguments

ArgumentRequiredDescription
instanceYesThe instance name

Options

OptionShortDescription
--yes-ySkip confirmation prompts

Confirmation

Without --yes, the command displays instance details (name, preset, agent, URL, local path) and requires two confirmations:

  1. A yes/no prompt: "Are you sure you want to destroy instance? This will delete the project and cannot be undone."
  2. A typed confirmation: "Type delete my project to confirm"

Cleanup sequence

Once confirmed, the command performs cleanup in this order:

  1. Unregister channel webhooks for all configured channels (Telegram, Discord, Slack, etc.). This is best-effort; failures do not block the rest of the cleanup
  2. Stop running sandboxes by listing all sandboxes with running or pending status and stopping them
  3. Delete snapshots by listing all stored snapshots and deleting them
  4. Delete platform project on Vercel. Failures are logged as warnings but do not block
  5. Remove local directory at ~/.clawrun/<instance-name>/ and all its contents

If the instance has no configuration (e.g., a partially-created instance), the command skips platform cleanup and removes only the local directory.

Examples

clawrun destroy my-instance
clawrun destroy my-instance -y
clawrun rm my-instance -y