Removing an ElasticSearch index
Note
It is only possible to remove an index from the command line
First you can run the following command to return a full list of available indexes:
curl localhost:9200/_cat/indices copy
Note
If you are using an external ElasticSearch server please substitute 'localhost' for the server's IP address
This will return a list similar to the example below:
curl 192.168.80.98:9200/_cat/indices
yellow open help JkSNC5T2R2K_G42lx1YWSQ 1 1 190 174 2.5mb 2.5mb
yellow open new TFMEZ9fIT5e596_h_y_nUg 1 1 16 16 92.4kb 92.4kb
yellow open helpdesk2 jTXVSyq0Q_aWGhTMJjPH_A 1 1 190 0 1.4mb 1.4mb
yellow open dp_helpdesk1 qj3-aDbsTbez3uWxCZqPZw 1 1 2 0 17kb 17kb
yellow open helpdesk3 vumxtbORRzu0SIHKn3Dv_g 1 1 212 0 1.4mb 1.4mb
yellow open dp_helpdesk2 QFDDTG4tQmy0qae1zulMOA 1 1 2 0 17kb 17kb
yellow open helpdesk 8DzG0qn7QXusD7PLC-P_7Q 1 1 16 6 76.5kb 76.5kb copy
To then remove one of the indexes you run the following command, specifying the index you want to remove:
curl -X DELETE "localhost:9200/<name_of_index>" copy
Repeat this command to remove every index you want to delete.
Please log in or register to submit a comment.