---
title: "Delete Index Operation"
url: "https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index"
version: "6.2"
language: "csharp"
---

# Delete Index Operation

> Client language: C#. Also available for [Java](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index.java.md), [Python](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index.python.md), [PHP](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - Use `DeleteIndexOperation` to remove an index from the database.
>
> - The index will be deleted from all the database-group nodes.
>
> - In this page:
>   - [Delete index example](#delete-index-example)
>   - [Syntax](#syntax)

## Delete index example

### Sync

```csharp
// Define the delete index operation, specify the index name
var deleteIndexOp = new DeleteIndexOperation("Orders/Totals");

// Execute the operation by passing it to Maintenance.Send
store.Maintenance.Send(deleteIndexOp);
```

### Async

```csharp
// Define the delete index errors operation, specify the index name
var deleteIndexOp = new DeleteIndexOperation("Orders/Totals");
              
// Execute the operation by passing it to Maintenance.SendAsync
await store.Maintenance.SendAsync(deleteIndexOp);
```

## Syntax

```csharp
public DeleteIndexOperation(string indexName)
```

| Parameter | Type | Description |
| - | - | - |
| **indexName** | `string` | Name of index to delete |

## See also

- [What are Indexes](https://docs.ravendb.net/6.2/indexes/what-are-indexes.md)
- [Creating and Deploying Indexes](https://docs.ravendb.net/6.2/indexes/creating-and-deploying.md)
- [Index Administration](https://docs.ravendb.net/6.2/indexes/index-administration.md)
- [How to Get Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index.md)
- [How to Put Indexes](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/put-indexes.md)
