# Indices keep appearing after deleting /data directory

**URL:** <https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559>\
**Category:** Elasticsearch\
**Created:** [May 30, 2019, 2:55pm UTC](https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559 "2019-05-30T14:55:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![javiroberts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javiroberts/32/47169_2.png) [@javiroberts](https://discuss.elastic.co/u/javiroberts)\
**Post date:** [May 30, 2019, 2:55pm UTC](https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559/1 "2019-05-30T14:55:52Z")

</div>

Hi everyone! I'm new here and relatively new in ES usage (I've been using it since v5.x).

The last days I've come along the following issue:

I want to make a fresh install of ES on the three VMs of my cluster, and for that I deleted the following dirs:

```auto
/elasticsearch_0/data
/elasticsearch_0/log
/elasticsearch_1/data
/elasticsearch_1/log
/elasticsearch_2/data
/elasticsearch_2/log

```

Then, I deleted all installation files, unzipped it again and restarted my cluster.

When I `$ curl http://<node>:9200/_cat/indices` I get the following answer:

```auto
red open .security-6 t7GWpZYGTROvIVeyRmmF2A 1 1             
red open events 3kjZqpKpQFezGC2EClGEUg 5 1 0 0 1kb 522b
red open .kibana_task_manager sd3MhsOzTz6rlDxpDMXK8w 1 1             
red open metrics pvUAl-YIR1WRVmmpL2zpmA 5 1 0 0 1kb 522b
red open .kibana_1 hnL2EriETpCugzmLVuvS4w 1 1             

```

It seems that `events` and `metrics` indices were created again!

Why is this happening? Do I have to delete any other directory to do a fresh install?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 30, 2019, 9:44pm UTC](https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559/2 "2019-05-30T21:44:47Z")

</div>

Welcome 🙂

> [@javiroberts](#):
>
> Why is this happening?

Because something will be asking Elasticsearch to create these indices. What version are you on?

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [May 31, 2019, 8:50am UTC](https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559/3 "2019-05-31T08:50:56Z")

</div>

> [@warkolm](#):
>
> Because something will be asking Elasticsearch to create these indices

I'm not sure that this is the cause, but the logs will tell us for sure. On the elected master node, looking back to when it first started up in the new cluster, you should see a message saying:

```plaintext
recovered [xx] indices into cluster_state

```

If the number `xx` is not zero then the cluster did not start up empty. If it _is_ zero, but there are other messages containing the string `DanglingIndicesState` then, again, the cluster did not start up empty. If neither of the above then there should be later messages containing the string `creating index`, indicating that the indices are being re-created later on.

---

<div class="post-metadata">

**Author:** ![javiroberts](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/javiroberts/32/47169_2.png) [@javiroberts](https://discuss.elastic.co/u/javiroberts)\
**Post date:** [May 31, 2019, 3:26pm UTC](https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559/4 "2019-05-31T15:26:02Z")

</div>

Thank you for the answers.

> [@warkolm](#):
>
> What version are you on?

I'm on 6.8.0

I solved it by manually deleting those indices via curl.

As you said, that log message appeared in my console. But my question is, why? since I wiped all my data dirs, and reinstalled ES, is this information stored anywhere on the server?

---

<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:** [June 28, 2019, 3:26pm UTC](https://discuss.elastic.co/t/indices-keep-appearing-after-deleting-data-directory/183559/5 "2019-06-28T15:26:14Z")

</div>

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