# Elasticsearch does not delete old folder after shard rerouting

**URL:** <https://discuss.elastic.co/t/elasticsearch-does-not-delete-old-folder-after-shard-rerouting/40762>\
**Category:** Elasticsearch\
**Created:** [February 2, 2016, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-delete-old-folder-after-shard-rerouting/40762 "2016-02-02T16:58:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edeak](https://avatars.discourse-cdn.com/v4/letter/e/a698b9/32.png) [@edeak](https://discuss.elastic.co/u/edeak)\
**Post date:** [February 2, 2016, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-delete-old-folder-after-shard-rerouting/40762/1 "2016-02-02T16:58:59Z")

</div>

Hi guys,

I have a cluster with two data nodes (d1, d2) and I have two indices (i1, i2) with 1 shard per each (no replica yet).  
When I started to index my whole data (around 70GB) one of the primary shards were routed to the first and the other one was routed to the second node. After a while, d1 storage ran out of space so ElasticsSearch started to route my i1 shard to d2.  
I managed to create enough free space to have i1 on d1 so I did a rerouting (from d2 to d1).  
After it has finished, I still can i1 folder on d2 and I guess (not sure but it seems) that if I query that, it uses the d2 node.  
Maybe I did something not properly but I guess after rerouting i1 from d2 to d1 I would expect that the folder is deleted.  
What can I do now?

---

<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 5, 2017, 11:19pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-delete-old-folder-after-shard-rerouting/40762/2 "2017-07-05T23:19:33Z")

</div>


