[[slm-api-execute-retention]]
=== Execute snapshot retention policy API
++++
Execute snapshot retention policy
++++
Deletes any snapshots that are expired according to the policy's retention rules.
[[slm-api-execute-retention-request]]
==== {api-request-title}
`POST /_slm/_execute_retention`
[[slm-api-execute-retention-prereqs]]
==== {api-prereq-title}
If the {es} {security-features} are enabled, you must have the `manage_slm`
cluster privilege to use this API. For more information, see
<>.
[[slm-api-execute-retention-desc]]
==== {api-description-title}
Manually applies the retention policy to force immediate removal of expired snapshots.
The retention policy is normally applied according to its schedule.
[[slm-api-execute-retention-example]]
==== {api-examples-title}
To force removal of expired snapshots:
[source,console]
--------------------------------------------------
POST /_slm/_execute_retention
--------------------------------------------------
Retention runs asynchronously in the background.