# Delete and re-create an index pattern

**URL:** <https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689>\
**Category:** Kibana\
**Created:** [August 12, 2020, 9:18am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689 "2020-08-12T09:18:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![leo.hamon](https://avatars.discourse-cdn.com/v4/letter/l/85f322/32.png) [@leo.hamon](https://discuss.elastic.co/u/leo.hamon)\
**Post date:** [August 12, 2020, 9:18am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/1 "2020-08-12T09:18:45Z")

</div>

Hi everyone,

I have an issue with my dashboards. They are built on an index pattern, I wanted to know if I can delete the index safely and re-create another one with the same name ? Will I keep my dashboards safe, or will they be destroyed ?

Has anyone faced that issue before ?  
Thank you in advance

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [August 12, 2020, 9:40am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/2 "2020-08-12T09:40:52Z")

</div>

Why do you want to delete the index pattern? If the underlying mapping of your data indices changed, you can simply "refresh" the pattern using the button in the top right on the index pattern page:

 ![Screenshot 2020-08-12 at 11.39.53](https://us1.discourse-cdn.com/elastic/original/3X/9/7/978cd1271ce1047895430e6b5ab5a504f73d3c28.png)

---

<div class="post-metadata">

**Author:** ![leo.hamon](https://avatars.discourse-cdn.com/v4/letter/l/85f322/32.png) [@leo.hamon](https://discuss.elastic.co/u/leo.hamon)\
**Post date:** [August 12, 2020, 9:46am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/3 "2020-08-12T09:46:29Z")

</div>

The ID of my index pattern has changed (I don't know how but it has changed) so the dashboards can't find the index pattern anymore, maybe you know how to edit this id so I can put the old one back ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [August 12, 2020, 9:51am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/4 "2020-08-12T09:51:41Z")

</div>

In this case you can note the id of the old index pattern the visualizations reference (the one they are complaining about when you want to view them) and after deleting the existing one with the new id recreate it specifying the old id in "Advanced options" in step two of the creation process:

 ![Screenshot 2020-08-12 at 11.49.10](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4c01328cf7c8b54bcb47a162bb73d9d1385f1e2.png)

---

<div class="post-metadata">

**Author:** ![leo.hamon](https://avatars.discourse-cdn.com/v4/letter/l/85f322/32.png) [@leo.hamon](https://discuss.elastic.co/u/leo.hamon)\
**Post date:** [August 12, 2020, 10:22am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/5 "2020-08-12T10:22:14Z")

</div>

Thank you that is actually working perfectly.

Another issue now, is this the same way for the Rollups ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [August 12, 2020, 11:51am UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/6 "2020-08-12T11:51:10Z")

</div>

For rolled up indices you need to create a special rollup index pattern - it's described here: [https://www.elastic.co/guide/en/kibana/current/data-rollups.html#\_visualize\_the\_rolled\_up\_data](https://www.elastic.co/guide/en/kibana/current/data-rollups.html#_visualize_the_rolled_up_data)

---

<div class="post-metadata">

**Author:** ![leo.hamon](https://avatars.discourse-cdn.com/v4/letter/l/85f322/32.png) [@leo.hamon](https://discuss.elastic.co/u/leo.hamon)\
**Post date:** [August 12, 2020, 12:09pm UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/7 "2020-08-12T12:09:52Z")

</div>

Yes actually, for re-create them, does it works like for the basic index pattern ?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [August 12, 2020, 1:31pm UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/8 "2020-08-12T13:31:42Z")

</div>

Yes, but you have to make sure all your visualizations use aggregations allowed by your rollup config

---

<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:** [September 9, 2020, 1:31pm UTC](https://discuss.elastic.co/t/delete-and-re-create-an-index-pattern/244689/9 "2020-09-09T13:31:53Z")

</div>

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