| title | c8volt delete process-instance |
|---|---|
| nav_exclude | true |
[CLI Reference]({{ "/cli/" | relative_url }})
Delete process instances by key or filters
Delete process instances by key or search filters, optionally cancelling first.
By default c8volt validates the complete affected tree before submitting any delete request, prompts before deletion, and waits until deletion is observed. If any affected process instance is not in a final state, the whole delete batch is refused before mutation. Use --force to cancel the affected scope first, then delete it.
Tenant contract: --tenant scopes search-derived candidate discovery where supported. Explicit --key and stdin keys are backend-authorized admin input; existing dry-run, confirmation, force, and wait safety checks still apply.
When --bpmn-process-id is set, c8volt validates that the process definition is visible before searching process instances. A missing selector fails with a local diagnostic before paging, dry-run planning, confirmation, cancellation, or deletion; --json, --automation, and non-TTY runs never prompt for recovery output. If the selector is visible but no matching instances are found, no deletion request is submitted.
Search mode pages through matching process instances by default and freezes every selected page-level delete plan before one confirmation and mutation. --batch-size controls each discovery page request, --limit caps the frozen delete scope across all pages, and --workers, --fail-fast, and --no-worker-limit bound independent planning, cancellation, or deletion work. Verbose paging progress is written away from stdout; JSON, quiet, and automation output remain free of prompts unless confirmation is explicitly supplied.
Use --dry-run to preview selected, in-scope, final-state, non-final, and partial-scope instances without deleting or cancelling.
Use --auto-confirm for unattended destructive runs.
c8volt delete process-instance [flags]
./c8volt delete process-instance --key <process-instance-key> --force
./c8volt delete process-instance --key <process-instance-key> --dry-run
./c8volt delete process-instance --state terminated --batch-size 250 --limit 5 --dry-run
./c8volt delete process-instance --state terminated --end-date-after 2026-05-01 --end-date-before 2026-05-31 --limit 5 --dry-run
./c8volt delete process-instance --bpmn-process-id <bpmn-process-id> --state terminated --batch-size 250 --limit 5 --dry-run
./c8volt expect process-instance --key <process-instance-key> --state absent
-n, --batch-size int32 number of process instances to inspect per discovery page; does not cap total frozen scope (max limit 1000 enforced by server) (default 1000)
-b, --bpmn-process-id string BPMN process ID to filter process instances
--dry-run preview delete scope without submitting deletion or cancel-before-delete requests
--end-date-after string only include process instances with end date >= YYYY-MM-DD
--end-date-before string only include process instances with end date <= YYYY-MM-DD
--end-date-newer-days int only include process instances with end date N days old or newer (0 means today) (default -1)
--end-date-older-days int only include process instances with end date N days old or older (default -1)
--fail-fast stop scheduling new instances after the first error
--force force cancellation of the process instance(s), prior to deletion
-h, --help help for process-instance
-k, --key strings process instance key(s) to delete; repeat or combine with stdin '-'
-l, --limit int32 maximum number of matching process instances to freeze for deletion across all pages; omit to continue through all matches
--no-state-check skip checking the current state of the process instance before deleting it
--no-wait return after deletion is accepted
--no-worker-limit use all queued jobs as workers when --workers is unset
--pd-version int32 process definition version
--pd-version-tag string process definition version tag
--start-date-after string only include process instances with start date >= YYYY-MM-DD
--start-date-before string only include process instances with start date <= YYYY-MM-DD
--start-date-newer-days int only include process instances N days old or newer (0 means today) (default -1)
--start-date-older-days int only include process instances N days old or older (default -1)
-s, --state string state to filter process instances: all, active, completed, canceled, terminated (default "all")
-w, --workers int maximum concurrent workers when --batch-size > 1 (default: min(batch-size, 2*GOMAXPROCS, 32))
-y, --auto-confirm auto-confirm prompts for non-interactive use
--automation enable non-interactive mode for commands that explicitly support it
--config string path to config file
--debug enable debug logging
-j, --json output as JSON (where applicable)
--keys-only output keys only (where applicable)
--log-level string log level (debug, info, warn, error) (default "info")
--no-indicator disable transient terminal activity indicators
--profile string config active profile name to use (e.g. dev, prod)
-q, --quiet suppress output except errors
--tenant string tenant ID for discovery/search, selection, create, deploy, and run flows; explicit keys/IDs remain backend-authorized
--timeout duration HTTP request timeout (default 30s)
-v, --verbose show additional output
- [c8volt delete]({{ "/cli/c8volt_delete" | relative_url }}) - Delete process instances or definitions