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

# Delete Index Errors Operation

> Client language: C#. Also available for [Python](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index-errors.python.md), [PHP](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index-errors.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/delete-index-errors.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 `DeleteIndexErrorsOperation` to delete indexing errors.
>
> - The operation will be executed only on the server node that is defined by the current [client-configuration](https://docs.ravendb.net/6.2/client-api/configuration/load-balance/overview.md#client-logic-for-choosing-a-node).
>
> - Deleting the errors will only **clear the index errors**.  
>   An index with an 'Error state' will Not be set back to 'Normal state'.
>
> - To just get index errors see [get index errors](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors.md).
>
> - In this page:
>   - [Delete errors from all indexes](#delete-errors-from-all-indexes)
>   - [Delete errors from specific indexes](#delete-errors-from-specific-indexes)
>   - [Syntax](#syntax)

## Delete errors from all indexes

### Sync

```csharp
// Define the delete index errors operation
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation();

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

// All errors from ALL indexes are deleted
```

### Async

```csharp
// Define the delete index errors operation
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation();

// Execute the operation by passing it to Maintenance.SendAsync
await store.Maintenance.SendAsync(deleteIndexErrorsOp);

// All errors from ALL indexes are deleted
```

## Delete errors from specific indexes

### Sync

```csharp
// Define the delete index errors operation from specific indexes
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation(new[] { "Orders/Totals" });

// Execute the operation by passing it to Maintenance.Send
// An exception will be thrown if any of the specified indexes do not exist
store.Maintenance.Send(deleteIndexErrorsOp);

// Only errors from index "Orders/Totals" are deleted
```

### Async

```csharp
// Define the delete index errors operation from specific indexes
var deleteIndexErrorsOp = new DeleteIndexErrorsOperation(new[] { "Orders/Totals" });

// Execute the operation by passing it to Maintenance.SendAsync
// An exception will be thrown if any of the specified indexes do not exist
await store.Maintenance.SendAsync(deleteIndexErrorsOp);

// Only errors from index "Orders/Totals" are deleted
```

## Syntax

```csharp
// Available overloads:
public DeleteIndexErrorsOperation()                    // Delete errors from all indexes
public DeleteIndexErrorsOperation(string[] indexNames) // Delete errors from specific indexes
```

| Parameters | Type | Description |
| - | - | - |
| **indexNames** | `string[]` | List of index names to delete errors from.<br />An exception is thrown if any of the specified indexes does not exist. |

## 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)
- [Debugging Index Errors](https://docs.ravendb.net/6.2/indexes/troubleshooting/debugging-index-errors.md)
- [Index Administration](https://docs.ravendb.net/6.2/indexes/index-administration.md)
- [How to Reset Index](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/reset-index.md)
- [Get index errors](https://docs.ravendb.net/6.2/client-api/operations/maintenance/indexes/get-index-errors.md)
