# swarmops repair

> Release: 0.11.0 · Last changed: 2026-10-24 · Source: https://github.com/KeiaiLab/SwarmOps/blob/stable/docs/reference/commands/repair.md

Rebuild what the journal can rebuild, quarantine damaged objects, drop damaged cache entries, then verify; the journal itself is never cut.

```yaml
title: "swarmops repair"
description: "Rebuild what the journal can rebuild, quarantine damaged objects, drop damaged cache entries, then verify; the journal itself is never cut."
group: "integrity"
since: "0.4.0"
mutates: true
identity_required: false
mcp_tool: "repair"
envelope_op: "repair"
exit_codes: [0]
errors: []
syntax: "swarmops repair [OPTIONS]"
```

## Syntax

```text
swarmops repair [OPTIONS]
```

## Required arguments

None.

## Optional arguments

The command also takes the [global options](../cli.md#global-options).

### `--dry-run`

Syntax: `--dry-run`.

List what it would do, and write nothing.

## Examples

### CLI

No recorded example yet.

### MCP

No recorded example yet.

## Return information

`result` is a `RepairResp` (`swarmops schema RepairResp` prints its JSON Schema).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `actions` | `array of RepairAction` | yes | What it did, or would do, in order. |
| `after` | `VerifySummary` | yes | The verify after it. |

Envelope `op`: `repair`.

Exit codes:

- `0`: Success.

## Errors

No golden step shows this command failing yet.

Any command that opens a store may also fail with a store error, such as [`E_NOT_A_REPO`](../errors.md#e_not_a_repo), [`E_IO`](../errors.md#e_io) or [`E_STORE_CORRUPT`](../errors.md#e_store_corrupt); a command line the grammar refuses is [`E_INVALID_ARG`](../errors.md#e_invalid_arg) (exit 2).

## See also

- [`swarmops verify`](verify.md)
- [`swarmops gc`](gc.md)
- [CLI reference](../cli.md)
- [Error codes](../errors.md)
