# Remove deprecated setting via API

**URL:** <https://discuss.elastic.co/t/remove-deprecated-setting-via-api/115406>\
**Category:** Elasticsearch\
**Created:** [January 13, 2018, 1:11pm UTC](https://discuss.elastic.co/t/remove-deprecated-setting-via-api/115406 "2018-01-13T13:11:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorrit\_Salverda](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jorrit\_Salverda](https://discuss.elastic.co/u/Jorrit_Salverda)\
**Post date:** [January 13, 2018, 1:11pm UTC](https://discuss.elastic.co/t/remove-deprecated-setting-via-api/115406/1 "2018-01-13T13:11:17Z")

</div>

I've upgrade to elasticsearch 6.1.1. When trying to update cluster settings it can't because it still has retired settings.

Running `curl 'localhost/_cluster/settings?pretty'` returns the following response which still has settings related to store throttling which are no longer in use since version 6.0 (see [https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking\_60\_settings\_changes.html#\_store\_throttling\_settings](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_60_settings_changes.html#_store_throttling_settings))

```
{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : "100mb"
        }
      }
    }
  },
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "exclude" : {
            "_ip" : ""
          }
        }
      }
    },
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : "merge"
        }
      }
    }
  }
}

```

I've tried removing them in the following ways, but none of them successful:

```
curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : ""
        }
      }
    }
  },
  "transient" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : ""
        }
      }
    }
  }
}'

```

and

```
curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : null
        }
      }
    }
  },
  "transient" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : null
        }
      }
    }
  }
}'

```

and

```
curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {
    "indices" : {
      "store" : {
      }
    }
  },
  "transient" : {
    "indices" : {
      "store" : {
      }
    }
  }
}'

```

So what's the proper way of deleting unknown settings?

I've seen multiple similar topics, but none of them has the answer. It would be good if during upgrades or setting merges obsolete settings got removed automatically.

---

<div class="post-metadata">

**Author:** ![Jorrit\_Salverda](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jorrit\_Salverda](https://discuss.elastic.co/u/Jorrit_Salverda)\
**Post date:** [January 13, 2018, 1:25pm UTC](https://discuss.elastic.co/t/remove-deprecated-setting-via-api/115406/2 "2018-01-13T13:25:51Z")

</div>

When trying to reset settings with

```
curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?pretty" -d '
{
  "persistent" : {},
    "transient" : {}
}'

```

I get the following error:

```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "action_request_validation_exception",
        "reason" : "Validation Failed: 1: no settings to update;"
      }
    ],
    "type" : "action_request_validation_exception",
    "reason" : "Validation Failed: 1: no settings to update;"
  },
  "status" : 400
}

```

When adding an existing setting to update it returns with the error about unknown settings. Is there a way to overwrite instead of merge settings?

---

<div class="post-metadata">

**Author:** ![Jorrit\_Salverda](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jorrit\_Salverda](https://discuss.elastic.co/u/Jorrit_Salverda)\
**Post date:** [January 13, 2018, 1:40pm UTC](https://discuss.elastic.co/t/remove-deprecated-setting-via-api/115406/3 "2018-01-13T13:40:46Z")

</div>

What at first sight seems to work is running

```
curl -XPUT -H "Content-Type: application/json" "localhost/_cluster/settings?flat_settings=true" -d '
{
  "persistent" : {
    "indices.store.throttle.*" : null  
  },
  "transient" : {
    "indices.store.throttle.*" : null
  }
}'

```

which returns

```
{"acknowledged":true,"persistent":{},"transient":{}}

```

but when running

```
curl 'localhost/_cluster/settings?pretty'

```

it still returns

```
{
  "persistent" : {
    "indices" : {
      "store" : {
        "throttle" : {
          "max_bytes_per_sec" : "100mb"
        }
      }
    }
  },
  "transient" : {
    "cluster" : {
      "routing" : {
        "allocation" : {
          "exclude" : {
            "_ip" : ""
          }
        }
      }
    },
    "indices" : {
      "store" : {
        "throttle" : {
          "type" : "merge"
        }
      }
    }
  }
}
```

---

<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:** [February 10, 2018, 1:41pm UTC](https://discuss.elastic.co/t/remove-deprecated-setting-via-api/115406/4 "2018-02-10T13:41:18Z")

</div>

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