# Ledger Data Pruning

The **Ledger Data Pruning** introduces a cutting-edge functionality to our platform, enabling users to retain only the latest chain data by setting desired History Blocks.

Cron run every month which will remove chain data based on the History Blocks of each chain.

{% hint style="danger" %}
While pruning, chain cache data also remove , it may slow down the subgraph indexing of respective chain.
{% endhint %}

## Manage Ledger Data Pruning On Node

**Step 1:** Purchase **Ledger Data Pruning** addons by navigating to [Graph Nodes Purchase](https://app.traceye.io/subgraph/graph-node/purchase).

{% hint style="info" %}
Refer [Purchase Subscription](/services/dedicated-indexing/graph-nodes/quick-start-guide/purchase-subscription.md) page for more details.
{% endhint %}

**Step 2:** To enable the **Storage & Query Optimizer** addon service, navigate to the specific node where it needs to be enabled.

{% hint style="info" %}
Refer [Manage Addon Services](/services/dedicated-indexing/graph-nodes/graph-node-manual/manage-addon-services.md) page for more details.
{% endhint %}

**Step 3:** Select a node to navigate to its details page. In this page ledger data pruning can be configured on desired chain.

### Configure Pruning

To configure ledger data pruning for a chain, follow these steps:

1. Click the **Configure** button, a modal window will appear.

<figure><img src="/files/ZU0c6xXjdc9Su3jABjS3" alt=""><figcaption></figcaption></figure>

2. Set desired **History Blocks**. ( The minimum value must be set at 500, while the maximum value should align with the latest block of the subgraph. )

<figure><img src="/files/96jneJbcHW6MzE44Chiq" alt=""><figcaption></figcaption></figure>

3. Click the **Confirm** button to configure ledger data pruning, or click **Close** button to dismiss the modal without making changes.

### Deconfigure Pruning

To deconfigure ledger data pruning for a chain, follow these steps:

1. Click on the **Configure** **Icon** of desired chain, a modal window will appear.

<figure><img src="/files/b1yN0EHWRZOtqjtJCYEL" alt=""><figcaption></figcaption></figure>

2. Click on the **Delete Icon**, this will deconfigure ledger data pruning on the chain.

<figure><img src="/files/MwcYPKcRvF0ZmfbO4iDM" alt=""><figcaption></figcaption></figure>


---

# 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://doc.traceye.io/services/dedicated-indexing/graph-nodes/graph-node-manual/ledger-data-pruning.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.
