# Index delete leaves translog folders

**URL:** <https://discuss.elastic.co/t/index-delete-leaves-translog-folders/3506>\
**Category:** Elasticsearch\
**Created:** [November 3, 2010, 5:07am UTC](https://discuss.elastic.co/t/index-delete-leaves-translog-folders/3506 "2010-11-03T05:07:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastian\_Gavarini](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sebastian\_Gavarini](https://discuss.elastic.co/u/Sebastian_Gavarini)\
**Post date:** [November 3, 2010, 5:07am UTC](https://discuss.elastic.co/t/index-delete-leaves-translog-folders/3506/1 "2010-11-03T05:07:28Z")

</div>

Hi, I am using the create and delete index functionality for index  
versioning while keeping aliases for current ones.  
The problem I am having is that after "delete" there are still some  
folders left in the folder, you could try the following to replicate:

curl -XPUT '[http://localhost:9200/twitter1/](http://localhost:9200/twitter1/)'  
curl -XPUT '[http://localhost:9200/twitter2/](http://localhost:9200/twitter2/)'  
curl -XDELETE '[http://localhost:9200/twitter1/](http://localhost:9200/twitter1/)'  
curl -XDELETE '[http://localhost:9200/twitter2/](http://localhost:9200/twitter2/)'

and on your ES data folder you'd see:

./nodes/0/\_state  
./nodes/0/\_state/shards-10  
./nodes/0/\_state/metadata-10  
./nodes/0/indices  
./nodes/0/indices/twitter2  
./nodes/0/indices/twitter2/0  
./nodes/0/indices/twitter2/0/translog  
./nodes/0/indices/twitter1  
./nodes/0/indices/twitter1/0  
./nodes/0/indices/twitter1/0/translog  
./nodes/0/node.lock

Is that behavior expected? I guess it should remove every trace of the  
index "twitter1" and "twitter2" if I called "delete".

Thanks,  
Sebastian.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 3, 2010, 1:33pm UTC](https://discuss.elastic.co/t/index-delete-leaves-translog-folders/3506/2 "2010-11-03T13:33:30Z")

</div>

Yes, it should, I have fixed a related problem in master, and will fix this  
as well.

-shay.banon

On Wed, Nov 3, 2010 at 7:07 AM, Sebastian [sgavarini@gmail.com](mailto:sgavarini@gmail.com) wrote:

> Hi, I am using the create and delete index functionality for index  
> versioning while keeping aliases for current ones.  
> The problem I am having is that after "delete" there are still some  
> folders left in the folder, you could try the following to replicate:
> 
> curl -XPUT '[http://localhost:9200/twitter1/](http://localhost:9200/twitter1/)'  
> curl -XPUT '[http://localhost:9200/twitter2/](http://localhost:9200/twitter2/)'  
> curl -XDELETE '[http://localhost:9200/twitter1/](http://localhost:9200/twitter1/)'  
> curl -XDELETE '[http://localhost:9200/twitter2/](http://localhost:9200/twitter2/)'
> 
> and on your ES data folder you'd see:
> 
> ./nodes/0/\_state  
> ./nodes/0/\_state/shards-10  
> ./nodes/0/\_state/metadata-10  
> ./nodes/0/indices  
> ./nodes/0/indices/twitter2  
> ./nodes/0/indices/twitter2/0  
> ./nodes/0/indices/twitter2/0/translog  
> ./nodes/0/indices/twitter1  
> ./nodes/0/indices/twitter1/0  
> ./nodes/0/indices/twitter1/0/translog  
> ./nodes/0/node.lock
> 
> Is that behavior expected? I guess it should remove every trace of the  
> index "twitter1" and "twitter2" if I called "delete".
> 
> Thanks,  
> Sebastian.

---

<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:17am UTC](https://discuss.elastic.co/t/index-delete-leaves-translog-folders/3506/3 "2017-07-06T04:17:14Z")

</div>


