# Logstash does not delete processed files

**URL:** <https://discuss.elastic.co/t/logstash-does-not-delete-processed-files/203322>\
**Category:** Logstash\
**Created:** [October 12, 2019, 6:10pm UTC](https://discuss.elastic.co/t/logstash-does-not-delete-processed-files/203322 "2019-10-12T18:10:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rysiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rysiu/32/61919_2.png) [@Rysiu](https://discuss.elastic.co/u/Rysiu)\
**Post date:** [October 12, 2019, 6:10pm UTC](https://discuss.elastic.co/t/logstash-does-not-delete-processed-files/203322/1 "2019-10-12T18:10:07Z")

</div>

Hello,

My Logstash works fine. However, I can't force deleting old files.

Part of the configuration file:

```
input {
	file {
		mode => read
		path => "/home/user/data/data_pre/*_0"
		start_position => "beginning"
		file_completed_action => delete
	}
}

```

logstash-input-file version:

```
...    
Updating logstash-input-file
Updated logstash-input-file 4.1.10 to 4.1.11

```

How can I force deleting files?  
_ **file\_completed\_action =\> delete** _ not work?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 12, 2019, 7:09pm UTC](https://discuss.elastic.co/t/logstash-does-not-delete-processed-files/203322/2 "2019-10-12T19:09:58Z")

</div>

Do you have write access to /home/user/data/data\_pre? Is that mount writeable?

---

<div class="post-metadata">

**Author:** ![Rysiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rysiu/32/61919_2.png) [@Rysiu](https://discuss.elastic.co/u/Rysiu)\
**Post date:** [October 13, 2019, 6:21am UTC](https://discuss.elastic.co/t/logstash-does-not-delete-processed-files/203322/3 "2019-10-13T06:21:58Z")

</div>

After correcting the permissions, the files are deleted.  
Thanks a lot!

---

<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:** [November 10, 2019, 6:22am UTC](https://discuss.elastic.co/t/logstash-does-not-delete-processed-files/203322/4 "2019-11-10T06:22:12Z")

</div>

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