---
sidebar_position: 6
title: MD_DELETE_DIVE
description: Permanently delete a Dive by ID.
feature_stage: preview
---

Permanently deletes a [Dive](/key-tasks/ai-and-motherduck/dives) and all its versions. This action cannot be undone.

## Syntax

```sql
SELECT * FROM MD_DELETE_DIVE(id = 'your-dive-uuid'::UUID);
```

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | `UUID` | Yes | The unique identifier of the Dive to delete |

## Return Columns

| Column | Type | Description |
|--------|------|-------------|
| `success` | `BOOLEAN` | `true` if the Dive was deleted |

## Examples

Delete a Dive:

```sql
SELECT * FROM MD_DELETE_DIVE(id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'::UUID);
```

## Errors

Returns an error if the Dive does not exist.

## Related

- [`MD_LIST_DIVES`](../md-list-dives) — List Dives to find the ID
- [`delete_dive` MCP tool](/sql-reference/mcp/delete-dive) — AI assistant equivalent
