# Remove 7.x indices after upgrade to 8.x

**URL:** <https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000>\
**Category:** Elasticsearch\
**Created:** [August 17, 2023, 10:57am UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000 "2023-08-17T10:57:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [August 17, 2023, 10:57am UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/1 "2023-08-17T10:57:34Z")

</div>

Hi

I was wondering if we could remove the old 7.x indices from our Elastic Stack, since we upgraded to 8.x?

E.g. Kibana:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/7/871cc6d06283d46415f4bcfe8d0ccd5d1ebb5bd1.png)  
Remark: I found out about the [allow\_restricted\_indices](https://discuss.elastic.co/t/reset-ilm-failed-step/327754/8) setting, which would probably allow me to manage them

Heartbeat, Filebeat & Metricbeat have ILM, which makes them disappear finally. Same for our (old) APM server.

I also found some other indices which seem to point to 7.x versions:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/e/6ef5b7e670b20fd8c19c0d2a528ef995ad152b3c.png)

Thanks!  
Christof

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [August 18, 2023, 9:27am UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/2 "2023-08-18T09:27:15Z")

</div>

Just set up a new env 8.7.1 via [blog tutorial](https://www.elastic.co/blog/getting-started-with-the-elastic-stack-and-docker-compose).

It seems at least .security-7 is still used in 8.x versions:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/1/31ec060572923e19a8b7361352758bdbe10ba165.png)

We currently have 935 indices, so I'm also revising the index strategy beside cleanup.  
**Anyone who can indicate with certainty which indices can be removed after an 7.17 to 8.x upgrade (we run currently 8.9)?**

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [August 28, 2023, 2:53pm UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/3 "2023-08-28T14:53:13Z")

</div>

No one?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 28, 2023, 3:02pm UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/4 "2023-08-28T15:02:25Z")

</div>

I believe you can start by removing everything which is like `*-7.*.*-*` but please check what are those indices first.  
I don't have a better answer yet.

Indices which don't have an exact version number in it should be kept as is IMO.

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [August 28, 2023, 3:06pm UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/5 "2023-08-28T15:06:56Z")

</div>

I'm afraid that might be risky. As indicated in my second post, I see that some indices with the "`*-7.*.*-*`" indication are still used:

> .security-7 is still used in 8.x versions

Based on you feedback, I assume it is best to not touch those indices..

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 28, 2023, 3:46pm UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/6 "2023-08-28T15:46:05Z")

</div>

But `.security-7` should not match `*-7.*.*-*`, right?

---

<div class="post-metadata">

**Author:** ![chouben](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chouben](https://discuss.elastic.co/u/chouben)\
**Post date:** [August 29, 2023, 6:34am UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/7 "2023-08-29T06:34:57Z")

</div>

Thanks for confirming! I was not sure if you meant the exact pattern or just a reference to 7.x stack.

---

<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 26, 2023, 6:35am UTC](https://discuss.elastic.co/t/remove-7-x-indices-after-upgrade-to-8-x/341000/8 "2023-09-26T06:35:16Z")

</div>

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