Skip to content

docs: Add '--all' flag to purge all completed workflows#5225

Open
tsonglew wants to merge 1 commit into
dapr:v1.18from
tsonglew:patch-1
Open

docs: Add '--all' flag to purge all completed workflows#5225
tsonglew wants to merge 1 commit into
dapr:v1.18from
tsonglew:patch-1

Conversation

@tsonglew

Copy link
Copy Markdown

Updated command to include '--all' flag for purging all completed workflows.

Thank you for helping make the Dapr documentation better!

Please follow this checklist before submitting:

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)
  • Read the contribution guide
  • Commands include options for Linux, MacOS, and Windows within tabpane
  • New file and folder names are globally unique
  • Page references use shortcodes instead of markdown or URL links
  • Images use HTML style and have alternative text
  • Places where multiple code/command options are given have tabpane

In addition, please fill out the following to help reviewers understand this pull request:

Description

Command to purge all completed workflows is not correct

dapr workflow purge --app-id order-processor

Error: one or more workflow instance ID arguments are required when not using purge all flags
Usage:
  dapr workflow purge [flags]

Flags:
      --all                          Purge all workflow instances in a terminal state. Use with caution.
      --all-filter-status string     Filter purge to only workflow instances with the given runtime status. Must be used with --all-older-than. One of RUNNING, COMPLETED, CONTINUED_AS_NEW, FAILED, CANCELED, TERMINATED, PENDING, SUSPENDED
      --all-older-than string        Purge workflow instances older than the specified Go duration or timestamp, e.g., '24h' or '2023-01-02T15:04:05Z'.
  -c, --connection-string string     Only used for Dapr runtime versions 1.16. The connection string used to connect and authenticate to the actor state store
      --force                        force will force a purge of a workflow, regardless of its current runtime state, or whether an active worker can process it, the backend will attempt to delete it anyway. This necessarily means the purging is executed out side of the workflow state machine, and therefore, can lead to corrupt state or broken workflow execution. Usage of this should _only_ be used when you know the workflow is not being currently processed. It is highly recommended to avoid using this flag unless absolutely necessary.
  -h, --help                         help for purge
      --scheduler-namespace string   Kubernetes namespace where the scheduler is deployed, only relevant if --kubernetes is set (default "dapr-system")
  -t, --table-name string            The name of the table or collection which is used as the actor state store

Global Flags:
  -a, --app-id string         The app ID owner of the workflow instance
  -k, --kubernetes            Target a Kubernetes dapr installation
      --log-as-json           Log output in JSON format
  -n, --namespace string      Namespace to perform workflow operation on (default "default")
      --runtime-path string   The path to the dapr runtime installation directory

one or more workflow instance ID arguments are required when not using purge all flags

Updated command to include '--all' flag for purging all completed workflows.

Signed-off-by: Tsonglew <tsonglew@gmail.com>
@tsonglew tsonglew requested review from a team as code owners June 22, 2026 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant