> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyborg.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Index

<Warning>This action is irreversible. Proceed with caution.</Warning>

Deletes the current index and all its associated data.

```python theme={null}
def delete_index(self,
                 *,
                 index_key: bytes,
                 user_id: bytes = None)
```

Deletes the current index and its associated data. This action is irreversible, so proceed with caution.

### Parameters

| Parameter | Type | Description |
| - | - | - |
| `index_key` | `bytes` | *(Required, keyword-only)* The 32-byte **root** index KEK. |
| `user_id` | `bytes` | *(Optional, keyword-only)* 16-byte RBAC user identifier. |

<Warning>Deleting an index is an admin operation gated on the **root** index KEK. It rejects [RBAC user](./manage-users) contexts — a per-user key cannot delete the index.</Warning>

### Exceptions

<AccordionGroup>
  <Accordion title="ValueError">
    * Throws if the index could not be deleted.
  </Accordion>
</AccordionGroup>

### Example Usage

```python theme={null}
# Load index
index = client.load_index(
    index_name=index_name, 
    index_key=index_key
)

# Delete the index
index.delete_index(index_key=index_key)
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.