wrangler workflows instances delete removes one or more instances
Introduced 2026-08-20 · score 0.97
HOW TO USE IT
When deleting Workflow instances, call `delete()` on a `WorkflowInstance` for one instance, `env.MY_WORKFLOW.deleteBatch(instanceIds)` for 1–100 IDs, or use Wrangler’s instances-delete command with positional IDs or a JSON array file; add `--local` for a local `wrangler dev` session.
const instance = await env.MY_WORKFLOW.get("<instance-id>");
await instance.delete();const result = await env.MY_WORKFLOW.deleteBatch(["<instance-id-1>", "<instance-id-2>"]);npx wrangler workflows instances delete <WORKFLOW_NAME> <INSTANCE_ID>... [--local]
npx wrangler workflows instances delete <WORKFLOW_NAME> --filename ./instance-ids.json [--local]WHY THIS HELPS
Delete Workflow instances from a remote or local environment.
REQUIREMENTS AND LIMITATIONS
- Version: 4.125.0
- WorkflowInstance.delete() (required): Deletes the instance and its stored state; self-deletion stops execution at the awaited call.
- instanceIds (required): Array of instance IDs; `deleteBatch()` accepts 1–100 IDs. Duplicates count toward the limit. Results include deleted IDs and per-instance errors.
- <NAME> (required): Workflow name.
- [ID]: One or more instance IDs; `latest` selects the most recently created instance.
- --filename: Path to a JSON file containing an array of instance IDs. Can be combined with positional IDs; together they accept up to 100 IDs.
- --local: Targets a Workflow running in a local `wrangler dev` session.
- Prerequisite: Use Wrangler 4.125.0 or later for instance deletion; the release note documents the feature as available in that version.
- Prerequisite: For `--local`, a local `wrangler dev` session is the target; Wrangler docs state the flag requires Wrangler 4.79.0 or later.
- Batch runtime deletion accepts up to 100 instances.
- CLI deletion accepts a combined limit of 100 IDs.
- Self-deletion stops the current execution.
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.125.0
- https://developers.cloudflare.com/changelog/post/2026-09-17-instance-delete/
- https://developers.cloudflare.com/workflows/build/workers-api/
- https://developers.cloudflare.com/workflows/build/trigger-workflows/
- https://developers.cloudflare.com/workflows/reference/wrangler-commands/
- https://developers.cloudflare.com/workers/wrangler/commands/workflows/
Check the installed version and the source before using it. Entry JSON