> ## Documentation Index
> Fetch the complete documentation index at: https://docs.2501.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# flush

> Delete scenario run data from the database

Delete scenario run data from the database. Always shows a preview and asks for confirmation before proceeding.

```bash theme={null}
2501 runner flush [filters] [options]
```

At least one filter is required.

***

## Options

| Option                        | Description                                                                         |
| ----------------------------- | ----------------------------------------------------------------------------------- |
| `--older-than <duration>`     | Delete records older than the given duration. Accepts `7d`, `24h`, `2w`, `1m`, etc. |
| `--scenario <keys>`           | Filter by scenario key(s), comma-separated (e.g. `nginx/001-broken-config,disk`).   |
| `--status <status>`           | Filter by status (see below).                                                       |
| `--deprecated`                | Delete records for scenario keys that no longer exist on disk.                      |
| `--all`                       | Delete all scenario run data. Requires typing `yes` to confirm.                     |
| `--preview`                   | Show what would be deleted without deleting anything.                               |
| `-y, --yes`                   | Skip the confirmation prompt.                                                       |
| `-p, --scenarios-path <path>` | Path to scenarios directory (used with `--deprecated`, auto-detected if omitted).   |
| `--env-file <path>`           | Path to env file (auto-detected if omitted).                                        |

**`--status` values:**

| Value                                                        | Namespace             |
| ------------------------------------------------------------ | --------------------- |
| `queued` / `running` / `completed` / `failed` / `cancelled`  | ScenarioReport status |
| `success` / `agentic_failure` / `hard_failure` / `no_action` | Job resolution status |

***

## Examples

```bash theme={null}
# Preview what would be deleted for scenarios older than 7 days
2501 runner flush --older-than 7d --preview

# Delete all runs for a specific scenario
2501 runner flush --scenario nginx/001-broken-config

# Delete all failed runs older than 30 days
2501 runner flush --older-than 30d --status FAILED

# Delete records for scenarios that no longer exist on disk
2501 runner flush --deprecated

# Delete everything (requires typing "yes")
2501 runner flush --all

# Non-interactive delete (CI usage)
2501 runner flush --older-than 14d --yes
```

Each flush removes matched `ScenarioReport` records along with their associated `Benchmark`, `Job`, `Task`, and `Ticket` records. The preview box shows exact counts before deletion. Run history is also visible in the Benchmark page in Command Center.
