---
title: "Delete Index Errors Operation"
description: "Clear indexing errors from RavenDB indexes using the DeleteIndexErrorsOperation to reset error state for specific or all indexes."
url: "https://docs.ravendb.net/7.2/client-api/operations/maintenance/indexes/delete-index-errors"
version: "7.2"
language: "nodejs"
---

# Delete Index Errors Operation

> Client language: Node.js. Also available for [C#](https://docs.ravendb.net/7.2/client-api/operations/maintenance/indexes/delete-index-errors.md), [Python](https://docs.ravendb.net/7.2/client-api/operations/maintenance/indexes/delete-index-errors.python.md), [PHP](https://docs.ravendb.net/7.2/client-api/operations/maintenance/indexes/delete-index-errors.php.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/7.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/7.2/client-api/operations/maintenance/indexes/get-index-errors.nodejs.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

```javascript
// Define the delete index errors operation
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation();

// Execute the operation by passing it to maintenance.send
await store.maintenance.send(deleteIndexErrorsOp);

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

## Delete errors from specific indexes

```javascript
// Define the delete index errors operation from specific indexes
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation(["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
await store.maintenance.send(deleteIndexErrorsOp);

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

## Syntax

```javascript
// Available overloads:
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation();           // Delete errors from all indexes 
const deleteIndexErrorsOp = new DeleteIndexErrorsOperation(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/7.2/indexes/what-are-indexes.nodejs.md)
- [Creating and Deploying Indexes](https://docs.ravendb.net/7.2/indexes/creating-and-deploying.nodejs.md)
- [Debugging Index Errors](https://docs.ravendb.net/7.2/indexes/troubleshooting/debugging-index-errors.md)
- [Index Administration](https://docs.ravendb.net/7.2/indexes/index-administration.md)
- [How to Reset Index](https://docs.ravendb.net/7.2/client-api/operations/maintenance/indexes/reset-index.nodejs.md)
- [Get index errors](https://docs.ravendb.net/7.2/client-api/operations/maintenance/indexes/get-index-errors.nodejs.md)
