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

# formae cancel

> Cancel in-progress commands. Reference for formae cancel and its flags.

Cancel commands that are currently in progress. With no query, `cancel` targets
the most recent command. With a query, it cancels all in-progress commands that
match.

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae cancel [flags]
```

Only commands in the `InProgress` state can be canceled. Commands that are already
executing resources finish those resources before moving to the `Canceled` state,
so no resources are left orphaned.

## Force cancel

Use `--force` to abandon in-progress work and drive the command straight to a
terminal `Canceled` state, instead of waiting for in-progress resources to finish.
This is an escape hatch for operations that will not complete on their own, such
as a plugin stuck in an unbounded poll loop. With `--force`:

* Cloud-side operations may keep running after the command is canceled.
* Update and Delete operations are self-healing: the synchronizer reconciles
  formae's state against actual cloud state on its next cycle.
* A still-running Create may orphan a cloud resource that formae cannot yet track,
  because it has no native id. You may need to clean it up manually, or let
  discovery pick it up.

## Flags

| Flag                                         | Default   | Description                                                                                                   |
| -------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------- |
| `--query <query>`                            |           | Select commands to cancel. With no query, cancels the most recent command. `*` works as a wildcard.           |
| `--force`                                    | `false`   | Abandon in-progress work and move the command to a terminal `Canceled` state immediately. See the note above. |
| `--status-output-layout <summary\|detailed>` | `summary` | What to print as status output.                                                                               |
| `--yes`                                      | `false`   | Run without any confirmations.                                                                                |
| `--output-consumer <human\|machine>`         | `human`   | Consumer of the command result.                                                                               |
| `--output-schema <json\|yaml>`               | `yaml`    | The schema to use for the result output.                                                                      |
| `--config <path>`                            |           | Path to a config file.                                                                                        |
| `--profile <name>`                           |           | Named profile to use.                                                                                         |
