# Can filebeat delete the file after complete the transfer

**URL:** <https://discuss.elastic.co/t/can-filebeat-delete-the-file-after-complete-the-transfer/150289>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [September 28, 2018, 5:02am UTC](https://discuss.elastic.co/t/can-filebeat-delete-the-file-after-complete-the-transfer/150289 "2018-09-28T05:02:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![walkexk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walkexk/32/35973_2.png) [@walkexk](https://discuss.elastic.co/u/walkexk)\
**Post date:** [September 28, 2018, 5:02am UTC](https://discuss.elastic.co/t/can-filebeat-delete-the-file-after-complete-the-transfer/150289/1 "2018-09-28T05:02:32Z")

</div>

or touch off a script to do the delete.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 28, 2018, 6:52am UTC](https://discuss.elastic.co/t/can-filebeat-delete-the-file-after-complete-the-transfer/150289/2 "2018-09-28T06:52:59Z")

</div>

As far as I know it can't, but the Logstash file input plugin has reasonably recently added a [read mode](https://www.elastic.co/guide/en/logstash/current/plugins-inputs-file.html#_read_mode) that seems to match what you are looking for.

---

<div class="post-metadata">

**Author:** ![walkexk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walkexk/32/35973_2.png) [@walkexk](https://discuss.elastic.co/u/walkexk)\
**Post date:** [September 28, 2018, 8:17am UTC](https://discuss.elastic.co/t/can-filebeat-delete-the-file-after-complete-the-transfer/150289/3 "2018-09-28T08:17:08Z")

</div>

the file filebeat transfered is not on the server have logstash,so this is not possible.

---

<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:** [October 26, 2018, 8:17am UTC](https://discuss.elastic.co/t/can-filebeat-delete-the-file-after-complete-the-transfer/150289/4 "2018-10-26T08:17:12Z")

</div>

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