# Curl command to Delete an Elastic search Index not working

**URL:** https://discuss.elastic.co/t/curl-command-to-delete-an-elastic-search-index-not-working/69395
**Category:** Elasticsearch
**Created:** [December 19, 2016, 6:59am UTC](https://discuss.elastic.co/t/curl-command-to-delete-an-elastic-search-index-not-working/69395 "2016-12-19T06:59:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![VijayKarthikeyan](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@VijayKarthikeyan](https://discuss.elastic.co/u/VijayKarthikeyan)
#### Post date: [December 19, 2016, 6:59am UTC](https://discuss.elastic.co/t/curl-command-to-delete-an-elastic-search-index-not-working/69395/1 "2016-12-19T06:59:37Z")

</div>

I have been working on Elastic search for a while and i have scenario to delete some indices in the elasticsearch.

As instructed in the ELK user guide, am trying to delete the indices using the CURL command in powershell on Windows Server 2012 R2

The command is given below

**$ curl -X DELETE '[http://localhost:9200/logstash-2016.12.19/](http://localhost:9200/logstash-2016.12.19/)'**

but when i give this command to delete in powershell, it throws the below error

**_Invoke-WebRequest : A parameter cannot be found that matches parameter name 'X'. At line:1 char:6 + curl -X DELETE '[http://10.242.244.170:9200/logstash-2016.12.19/](http://10.242.244.170:9200/logstash-2016.12.19/)' + ~~ + CategoryInfo : InvalidArgument: (🙂 [Invoke-WebRequest], ParameterBindingException + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.InvokeWebRequestCommand_**

Can anyone help me solve this issue?

---

<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: [December 19, 2016, 7:16am UTC](https://discuss.elastic.co/t/curl-command-to-delete-an-elastic-search-index-not-working/69395/2 "2016-12-19T07:16:45Z")

</div>

It's a question related to Curl on windows I think. Not related to elasticsearch itself.

That said, may be try with `-XDELETE` instead of `-X DELETE`?  
Read the documentation of your CURL application.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [December 19, 2016, 7:17am UTC](https://discuss.elastic.co/t/curl-command-to-delete-an-elastic-search-index-not-working/69395/3 "2016-12-19T07:17:10Z")

</div>

Yeah I think this is a curl on windows issue, not an ES one.

---

<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: [January 16, 2017, 7:17am UTC](https://discuss.elastic.co/t/curl-command-to-delete-an-elastic-search-index-not-working/69395/4 "2017-01-16T07:17:27Z")

</div>

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