# Delete a Kibana index from CLI

**URL:** <https://discuss.elastic.co/t/delete-a-kibana-index-from-cli/169280>\
**Category:** Kibana\
**Created:** [February 20, 2019, 7:38pm UTC](https://discuss.elastic.co/t/delete-a-kibana-index-from-cli/169280 "2019-02-20T19:38:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsaeks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rsaeks/32/5068_2.png) [@rsaeks](https://discuss.elastic.co/u/rsaeks)\
**Post date:** [February 20, 2019, 7:38pm UTC](https://discuss.elastic.co/t/delete-a-kibana-index-from-cli/169280/1 "2019-02-20T19:38:06Z")

</div>

Hi there,

I've tried to create an Index Pattern in Kibana to match an Elasticsearch index, but after trying no data displays even through Elasticsearch reports 32k+ documents. When trying to view the index in Kibana, I receive the following message:

Failed to fetch  
TypeError: Failed to fetch

I can click on other Indicies in the Kibana Index pattern via the Management UI but when clicking on this one (filebeat-) nothing displays. Further, I am unable to delete the index via the GUI.

Is there a command to delete the index via the CLI and attempt to re-create?

This is on Kibana 6.5

Thank you!

---

<div class="post-metadata">

**Author:** ![lukas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas/32/6812_2.png) [@lukas](https://discuss.elastic.co/u/lukas)\
**Post date:** [February 20, 2019, 8:21pm UTC](https://discuss.elastic.co/t/delete-a-kibana-index-from-cli/169280/2 "2019-02-20T20:21:44Z")

</div>

From Console you should be able to do the following:

DELETE index-name

Or from the command line you should be able to do the following:

curl -XDELETE [http://localhost:9200/index-name](http://localhost:9200/index-name)

---

<div class="post-metadata">

**Author:** ![rsaeks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rsaeks/32/5068_2.png) [@rsaeks](https://discuss.elastic.co/u/rsaeks)\
**Post date:** [February 20, 2019, 8:40pm UTC](https://discuss.elastic.co/t/delete-a-kibana-index-from-cli/169280/3 "2019-02-20T20:40:21Z")

</div>

Thanks! I am able to delete the individual index via Elasticsearch, but the pattern remains in Kibana. After deleting the index via Elasticsearch, it is re-created as expected with the new document records.

I can create a new Kibana index pattern to match filebeat\* (instead of filebeat-\*) but still receive the error message "TypeError: Failed to fetch" and Kibana hangs at Creating Index.

Clicking in either filebeat-\* or filebeat\* via the Kibana index pattern page results in the page hanging. I do, however, have the index ID string. Can that be deleted from Kibana in some way since the GUI is unresponsive for these patterns?

---

<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:** [March 20, 2019, 8:40pm UTC](https://discuss.elastic.co/t/delete-a-kibana-index-from-cli/169280/4 "2019-03-20T20:40:36Z")

</div>

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