# diagrid workflow purge

Purge workflow executions

### Description

Purge workflow execution state from the managed workflow store.

Use --bulk to purge every execution that matches the given filters (status,
name, id and end time) instead of a single execution. Unless --approve is
set, the matching executions are listed and confirmation is requested before
anything is purged.

```
diagrid workflow purge [flags]
```

### Examples

```

  # Purge a single workflow execution
  diagrid workflow purge --id my-app --instance-id my-instance

  # Bulk purge all failed executions of an id
  diagrid workflow purge --bulk --id my-app --status failed

  # Bulk purge executions of given workflow names that ended before a time
  diagrid workflow purge --bulk --name OrderWorkflow,ShippingWorkflow --end-before "2026-05-20T19:30:00+02:00"

  # Bulk purge executions that ended more than 24 hours ago
  diagrid workflow purge --bulk --older-than 24h

  # Bulk purge without confirmation
  diagrid workflow purge --bulk --status failed --approve

```

### Options

```
  -a, --id string             id used to orchestrate workflow. Required unless --bulk is set, where it filters the executions to purge.
  -i, --instance-id string    Instance ID of the workflow. Required unless --bulk is set.
  -p, --project string        Name of existing project
  -o, --output string         Output format, supported [table, yaml, json] (default "table")
      --bulk                  Purge every execution matching the given filters instead of a single execution.
  -s, --status strings        Filter executions to purge by status. Can be repeated to pass multiple values.
                              Valid values:canceled, completed, failed, running, suspended, terminated
  -n, --name strings          Filter executions to purge by workflow name. Can be repeated to pass multiple values.
      --end-before time       Return workflows that ended before the given time in RFC3339 format (e.g 2006-01-02T15:04:05Z07:00))
      --older-than duration   Filter executions to purge to those that ended more than the given duration ago (e.g. 24h). Cannot be used together with --end-before.
      --approve               Skip the confirmation prompt when purging in bulk.
  -y, --yes                   Skip confirmation prompt
  -h, --help                  help for purge
```

### Options inherited from parent commands

```
      --api-key string   Diagrid Cloud API key
```

### SEE ALSO

- [diagrid workflow](./workflow.md)	 - Explore workflow executions
