# Using Curator to delete old log files

**URL:** <https://discuss.elastic.co/t/using-curator-to-delete-old-log-files/165169>\
**Category:** Elasticsearch\
**Created:** [January 22, 2019, 7:55am UTC](https://discuss.elastic.co/t/using-curator-to-delete-old-log-files/165169 "2019-01-22T07:55:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cowensel](https://avatars.discourse-cdn.com/v4/letter/c/eb9ed0/32.png) [@cowensel](https://discuss.elastic.co/u/cowensel)\
**Post date:** [January 22, 2019, 7:55am UTC](https://discuss.elastic.co/t/using-curator-to-delete-old-log-files/165169/1 "2019-01-22T07:55:12Z")

</div>

Is there a way to use Curator to delete old log files for both Elasticsearch and logstash after so many days that are not sent to logstash? Can Curator run a powershell script?

I use curator currently for deleting old data and if I could use it for deleting log files it would be great (logging purposes).

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [January 22, 2019, 4:31pm UTC](https://discuss.elastic.co/t/using-curator-to-delete-old-log-files/165169/2 "2019-01-22T16:31:43Z")

</div>

Curator only interfaces with Elasticsearch using API calls. It cannot delete anything on a filesystem.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 19, 2019, 4:31pm UTC](https://discuss.elastic.co/t/using-curator-to-delete-old-log-files/165169/3 "2019-02-19T16:31:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
