# Deleting Old Activity

In ExaVault, history logs (activity logs) are stored in Elasticsearch and made searchable in the UI. Customers with large Elasticsearch datasets can purge older activity log data to improve performance.

If you want to preserve the old log data, make a backup of your VM before continuing.

To interact with Elasticsearch, first connect to your appliance via SSH. Once connected, open a shell inside the Elasticsearch container:

```
sudo docker exec -it exavault_elasticsearch_1 bash
```

## Viewing Indexes

List the indexes containing daily activity logs by sending a curl command to Elasticsearch:

```
curl -X GET "localhost:9200/_cat/indices/audit-*?v=true&s=index&pretty"
```

This lists the daily audit indexes. All audit indexes are named using the format `audit-YEAR`.

## Deleting Indexes

To delete an index, send an HTTP DELETE command to Elasticsearch with the name of the index:

```
curl -X DELETE "localhost:9200/audit-1990?pretty"
```

To delete more than one year, comma-separate the indexes. This deletes indexes 1990 and 1991:

```
curl -X DELETE "localhost:9200/audit-1990,audit-1991?pretty"
```


---

# 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://docs.exavault.com/administration-tasks/deleting-old-activity.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.
