# Curl command to delete cluster settings

**URL:** <https://discuss.elastic.co/t/curl-command-to-delete-cluster-settings/329019>\
**Category:** Elasticsearch\
**Created:** [March 31, 2023, 7:48am UTC](https://discuss.elastic.co/t/curl-command-to-delete-cluster-settings/329019 "2023-03-31T07:48:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![devarajsit](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@devarajsit](https://discuss.elastic.co/u/devarajsit)\
**Post date:** [March 31, 2023, 7:48am UTC](https://discuss.elastic.co/t/curl-command-to-delete-cluster-settings/329019/1 "2023-03-31T07:48:33Z")

</div>

Hi Team,

Is there any API where i can utilize to delete the cluster settings?

I have configured the cluster settings to use sniff mode but when i tried to change that to proxy mode, i am getting error that its already configured with sniff mode and cannot be changed to proxy mode.

```auto
curl -X PUT "http://a.b.c.d:31777/_cluster/settings" -H 'Content-Type: application/json' -d'
> {
> "persistent" : {
> "cluster" : {
> "remote" : {
> "elasticsearch" : {
> "mode": "proxy",
> "proxy_address": "x.y.z.4:31781"
> }
> }
> }
> }
> }'
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Setting \"cluster.remote.elasticsearch.seeds\" cannot be used with the configured \"cluster.remote.elasticsearch.mode\" [required=SNIFF, configured=PROXY]"}],"type":"illegal_argument_exception","reason":"Setting \"cluster.remote.elasticsearch.seeds\" cannot be used with the configured \"cluster.remote.elasticsearch.mode\" [required=SNIFF, configured=PROXY]"},"status":400}[dsadashivaia@target ~]$

```

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 31, 2023, 8:10am UTC](https://discuss.elastic.co/t/curl-command-to-delete-cluster-settings/329019/2 "2023-03-31T08:10:09Z")

</div>

Yes, you set unwanted settings to `null` using the very same API. See [these docs](https://www.elastic.co/guide/en/elasticsearch/reference/8.7/cluster-update-settings.html) for more information.

---

<div class="post-metadata">

**Author:** ![devarajsit](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@devarajsit](https://discuss.elastic.co/u/devarajsit)\
**Post date:** [March 31, 2023, 9:15am UTC](https://discuss.elastic.co/t/curl-command-to-delete-cluster-settings/329019/3 "2023-03-31T09:15:54Z")

</div>

Thanks @DavidTurner

For other folks information adding sample payload as well:

```auto
curl -X PUT "http://x.y.z.e:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
  "persistent" : {
  "cluster.*" : null 
  }
}'

```

---

<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:** [April 28, 2023, 9:16am UTC](https://discuss.elastic.co/t/curl-command-to-delete-cluster-settings/329019/4 "2023-04-28T09:16:34Z")

</div>

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