--- title: "Configure data retention settings using the CLI" slug: "configure-data-retention-settings-using-the-cli-2" tags: ["Install and Get Started", "NDR 4.x", "Customer", "Network Security"] updated: 2026-11-17T09:23:23Z published: 2026-11-17T09:23:23Z canonical: "docs.trellix.com/configure-data-retention-settings-using-the-cli-2" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.trellix.com/llms.txt > Use this file to discover all available pages before exploring further. # Configure data retention settings using the CLI Configure your storage limits through the CLI to control how long historical data stays on your appliance before being purged. 1. Log in to the Trellix NDR console as npadmin using your administrator credentials. ``` $ ssh npadmin@ ``` 2. Enter privileged mode on the CLI: ``` npadmin@hostname> enable ``` 3. Enter configuration mode: ``` npadmin@hostname# configure system ``` 4. Run the following commands to access the **Elasticsearch Maintenance Menu**: ``` npadmin@hostname(config)# cluster maintenance npadmin@hostname(cluster-maintenance)# maintenance ``` The **Elasticsearch Maintenance Menu** appears and displays the default value of 180 days. 5. Enter the number of days to keep the `metadata index Open` and press **Enter**. 6. Enter the number of days to keep the `alert index Open` and press **Enter**. 7. Select one of the following menu options to complete the configuration: - **Save** — Enter `X` and press **Enter** to apply the values and return to the main menu. - **Cancel** — Enter `C` and press **Enter** to exit and return to the main menu.