> ## 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>Deleting an index is irreversible.</Warning>

Deletes the index and all of its data from the CyborgDB service.

```typescript theme={null}
async deleteIndex(): Promise<{ status?: string; message: string }>
```

### Returns

`Promise<{ status, message }>`, e.g. `{ status: 'success', message: "Index 'temporary-index' deleted successfully" }`.

### Exceptions

<AccordionGroup>
  <Accordion title="CyborgDBNotFoundError">
    The index doesn't exist, for example because it was already deleted (HTTP `404`).
  </Accordion>

  <Accordion title="CyborgDBAuthenticationError">
    The `indexKey` or `apiKey` is invalid (HTTP `401`), or the client is using a per-user key: deleting an index requires the root key (HTTP `403`).
  </Accordion>

  <Accordion title="CyborgDBServiceError">
    The service returns `5xx`.
  </Accordion>
</AccordionGroup>

See [Errors](../errors) for the full hierarchy.

### Example Usage

```typescript theme={null}
const result = await index.deleteIndex();
console.log(result.status);
// Output: success

console.log((await client.listIndexes()).includes(await index.getIndexName()));
// Output: false
```


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