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

# outerbounds flowproject teardown-branch

The `teardown-branch` subcommand deletes all deployed resources for a project branch in a single operation. Use it to clean up after a merged or abandoned feature branch. For the full lifecycle workflow, including promoting assets before teardown, see [Tearing down a branch](https://anaconda.com/docs/platform/guides/projects/project-lifecycle.md#tearing-down-a-branch).

## Usage

```sh theme={null}
outerbounds flowproject teardown-branch --id <PROJECT/BRANCH> [OPTIONS]
```

## Options

Option

Description

`--id <PROJECT/BRANCH>`

Required. The project and branch identifier, such as `fraud_detection/feature-v2`.

`--dry-run`

Discover and list resources without deleting anything.

`--yes`

Skip the confirmation prompt.

`--output <FORMAT>`

Output format: `json` or human-readable. Defaults to human-readable.

Teardown discovers and deletes these resource types in order:

1. **Workflow templates**: Argo templates matching the project and branch annotations. Deleting a template cascades to its associated CronWorkflows and Sensors.
2. **Data assets**, as listed in the flowproject metadata.
3. **Model assets**, as listed in the flowproject metadata.
4. **Apps**: capsules tagged with the project and branch.
5. **Flowproject metadata**: the metadata record itself.

## Examples

Preview what would be deleted:

```sh theme={null}
outerbounds flowproject teardown-branch --id fraud_detection/feature-v2 --dry-run
```

Execute the teardown:

```sh theme={null}
outerbounds flowproject teardown-branch --id fraud_detection/feature-v2 --yes
```

Produce JSON output for scripting:

```sh theme={null}
outerbounds flowproject teardown-branch --id fraud_detection/feature-v2 --yes --output json
```

> [!WARNING]
>
> Teardown deletes asset metadata, not the underlying data. To keep assets from a feature branch, promote them with `promote_assets` before tearing down, as described in [Promoting assets before teardown](https://anaconda.com/docs/platform/guides/projects/project-lifecycle.md#promoting-assets-before-teardown).
