---
title: "templates delete"
description: "Delete a query template"
canonical: "https://pgbeam.com/docs/cli/templates/delete"
last-updated: "2026-10-21T01:05:40.000Z"
---

# templates delete

> Delete a query template

URL: https://pgbeam.com/docs/cli/templates/delete

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

Removes the template, so a profile that runs templates only stops admitting its statement. Deleting the last template is allowed: such a profile then admits nothing, which is the intended way to withdraw access in an incident.

## Usage

```bash
pgbeam templates delete <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
# Delete a query template
pgbeam templates delete

# Output as JSON
pgbeam templates delete --json
```

## Output

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