﻿---
title: stack es slm execute-retention cli command
description: Run a retention policy. Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://docs-v3-preview.elastic.dev/elastic/cli/pull/480/cli/stack/es/slm/execute-retention
---

# stack es slm execute-retention cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack es slm execute-retention [options]
```

Run a retention policy.
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--master-timeout string">
    The period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
  </definition>
  <definition term="--timeout string">
    The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--[no-]dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--[no-]json">
    output as JSON
  </definition>
</definitions>