# How to stop Ml Daily Maintenance Service in elasticsearch (SLM retention snapshot cleanup task)

**URL:** <https://discuss.elastic.co/t/how-to-stop-ml-daily-maintenance-service-in-elasticsearch-slm-retention-snapshot-cleanup-task/255623>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [November 17, 2020, 6:12am UTC](https://discuss.elastic.co/t/how-to-stop-ml-daily-maintenance-service-in-elasticsearch-slm-retention-snapshot-cleanup-task/255623 "2020-11-17T06:12:07Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![droberts195](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/droberts195/32/17692_2.png) [@droberts195](https://discuss.elastic.co/u/droberts195)\
**Post date:** [November 17, 2020, 9:47am UTC](https://discuss.elastic.co/t/how-to-stop-ml-daily-maintenance-service-in-elasticsearch-slm-retention-snapshot-cleanup-task/255623/9 "2020-11-17T09:47:26Z")

</div>

The ML daily maintenance task only touches indices named `.ml-anomalies*` and `.ml-state*`. Are you storing your own data in indices with names that match these patterns? If you are then please switch to using other indices, as these patterns are reserved for the Elastic ML plugin.

The ML daily maintenance is running extremely quickly, which makes me wonder if you are not using ML at all. Is that correct? If you are not using ML at all you can disable it by putting `xpack.ml.enabled: false` in your `elasticsearch.yml`. Please be aware that after doing this **none** of the ML APIs will work. Disabling the ML plugin and restarting the cluster will stop the ML daily maintenance task from running. But then, assuming your indices are not named `.ml*`, I think you will find that it wasn't the ML daily maintenance that was deleting your indices after all.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-stop-ml-daily-maintenance-service-in-elasticsearch-slm-retention-snapshot-cleanup-task/255623)._
