---
title: "branches discard"
description: "Discard a sandbox branch"
canonical: "https://pgbeam.com/docs/cli/branches/discard"
last-updated: "2026-10-30T03:14:55.000Z"
---

# branches discard

> Discard a sandbox branch

URL: https://pgbeam.com/docs/cli/branches/discard

{/* Auto-generated from CLI commands. Do not edit. Run `pnpm generate:cli-docs` to regenerate. */}

Marks an ephemeral sandbox branch as discarded for teardown.

## Usage

```bash
pgbeam branches discard <id> [flags]
```

## Options

| Option        | Description                                                 | Required | Default |
| ------------- | ----------------------------------------------------------- | -------- | ------- |
| `<id>`        |                                                             | Yes      | -       |
| `--yes`, `-y` | Skip the confirmation prompt (useful for scripts and CI/CD) | No       | -       |

> **Global options**
>
> All [global options](/docs/cli/global-options) (`--token`, `--profile`,
> `--project`, `--org`, `--json`, `--no-color`, `--no-trunc`, `--debug`) are
> also available on this command.

## Examples

```bash
# Discard a sandbox branch
pgbeam branches discard

# Output as JSON
pgbeam branches discard --json
```

## Output

Renders a human-readable table or detail view by default; pass `--json` for the raw API response.