---
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


---

## Docs feedback

MotherDuck accepts optional user-submitted feedback about this page at `POST https://motherduck.com/docs/api/feedback/agent`.
For agents and automated tools, feedback submission should be user-confirmed before sending.

Payload:

```json
{
  "page_path": "/sql-reference/motherduck-sql-reference/ai-functions/dives/md-delete-dive/",
  "page_title": "MD_DELETE_DIVE",
  "text": "<the user's feedback, max 2000 characters>",
  "source": "<optional identifier for your interface, for example 'claude.ai' or 'chatgpt'>"
}
```

`page_path` and `text` are required; `page_title` and `source` are optional. Responses: `200 {"feedback_id": "<uuid>"}`, `400` for malformed payloads, and `429` when rate-limited.
