# Deleting

{% hint style="warning" %}
**Be careful:** Deleting saved data can be a dangerous task, as it may result in the player losing their progress.
{% endhint %}

## Single

Use the `DeleteData` method to delete saved data with a specific ID.

```csharp
saveState.DeleteData("MyDataID");
```

This method returns a [Save Operation](/esave/esave-pro/scripting/save-operation.md) (result type: `bool`). The result is true if the data was successfully deleted. Otherwise, false.

## Multiple

You can also delete multiple data with the `DeleteData` method. Simply provide the ID of each of the data that you'd like to delete.

```csharp
saveState.DeleteData("MyDataID1", "MyDataID2");
```

This method returns a [Save Operation](/esave/esave-pro/scripting/save-operation.md) (result type: `bool`). The result is true if all specified data's were&#x20;deleted. If even one fails, the result is false.

## All

The `DeleteAllData` method deletes all saved data, completely emptying a save state. This does not remove the save state itself.

```csharp
saveState.DeleteAllData();
```

This method returns a [Save Operation](/esave/esave-pro/scripting/save-operation.md) (result type: `bool`). The result in this case is irrelevant (always true).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://espergames.gitbook.io/esave/esave-pro/scripting/saving-and-loading/managing-data/deleting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
