Now that we have created an index, let’s see how we can delete an index. In fact, we are going to delete the index that we created in the previous article in this series and add it again later.
Open the Sense plugin for Kibana and simply issue the below request to delete the index.
Let’s ensure that the index was deleted correctly by listing all of the indexes within our cluster.
GET /_cat/indices?v Result: health status index pri rep docs.count docs.deleted store.size pri.store.size yellow open .kibana 1 1 2 0 5kb 5kb
As you can see, we no longer have an index with a name of ecommerce. Thanks to the REST API that Elasticsearch exposes, it is really that easy to delete an index in Elasticsearch.