Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions cli/checkly-destroy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ npx checkly destroy [options]
|--------|----------|-------------|
| `--config, -c` | - | The Checkly CLI configuration file. If not passed, uses the `checkly.config.ts\|js` file in the current directory. |
| `--force, -f` | - | Force mode. Skips the confirmation dialog. |
| `--preserve-resources` | - | Delete only the project, detaching its resources so they remain in your Checkly account. |

## Command Options

Expand Down Expand Up @@ -62,6 +63,28 @@ npx checkly destroy -f
<Warning>Use with extreme caution as this command option bypasses safety prompts.</Warning>
</ResponseField>

<ResponseField name="--preserve-resources" type="boolean">

<Note>Available since CLI version `7.10.0`.</Note>

Delete the project but preserve all of its resources (checks, groups, alert channels, dashboards, etc.) in your Checkly account. The resources are detached from the CLI project and become regular account-level resources that are no longer managed by the CLI.

Use this when you want to stop managing resources as code but keep them running in your account.

**Usage:**

```bash Terminal
npx checkly destroy --preserve-resources
```

**Examples:**

```bash Terminal
$ npx checkly destroy --preserve-resources --force
```

</ResponseField>

## What Gets Destroyed

The `destroy` command removes the all the resources managed by the specified project. These resources could include:
Expand All @@ -73,6 +96,8 @@ The `destroy` command removes the all the resources managed by the specified pro
- **Maintenance Windows** created via CLI
- **Private Locations** (if managed by the project)

When run with `--preserve-resources`, only the project itself is deleted. All of the above resources remain in your Checkly account as regular account-level resources and are no longer tracked by the CLI.

## Safety Considerations

By default, the command prompts for confirmation:
Expand Down