# Delete a log file after indexing via logstash

**URL:** <https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239>\
**Category:** Logstash\
**Created:** [February 9, 2016, 5:21am UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239 "2016-02-09T05:21:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu.nv](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@subbu.nv](https://discuss.elastic.co/u/subbu.nv)\
**Post date:** [February 9, 2016, 5:21am UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239/1 "2016-02-09T05:21:21Z")

</div>

Due to spacing constraint, i may have to delete the physical file once the indexing in done. is it possible to handle this with in the .conf file in logstash?

Please help. thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [February 9, 2016, 8:58am UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239/2 "2016-02-09T08:58:58Z")

</div>

There's no simple way of doing this. The links below provide further reading.

> <https://stackoverflow.com/questions/30759951/delete-logs-after-consumption-logstash>

> <https://github.com/logstash-plugins/logstash-input-file/issues/52>

---

<div class="post-metadata">

**Author:** ![frederes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frederes/32/12476_2.png) [@frederes](https://discuss.elastic.co/u/frederes)\
**Post date:** [October 13, 2016, 3:50pm UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239/3 "2016-10-13T15:50:44Z")

</div>

Hello,

I have a logstah monitoring all files of type \*.csv in a directory.  
If i delete or change the content of one .csv, will logstash be perturbated in its indexation task ?

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [October 13, 2016, 4:25pm UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239/4 "2016-10-13T16:25:31Z")

</div>

@frederes, please start a new thread for your unrelated question.

---

<div class="post-metadata">

**Author:** ![frederes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/frederes/32/12476_2.png) [@frederes](https://discuss.elastic.co/u/frederes)\
**Post date:** [October 14, 2016, 9:09am UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239/5 "2016-10-14T09:09:55Z")

</div>

ok done, sorry

---

<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:** [July 6, 2017, 4:34am UTC](https://discuss.elastic.co/t/delete-a-log-file-after-indexing-via-logstash/41239/6 "2017-07-06T04:34:13Z")

</div>


