---
type: api
title: Delete the license
description: When the license expires, your subscription level reverts to Basic.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-license-delete
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/operation/operation-license-delete
products:
  - Elasticsearch
---

# Delete the license

Availability:

## Paths

- `DELETE` `/_license`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/v8/authentication#bearerauth)

## Description

When the license expires, your subscription level reverts to Basic.

If the operator privileges feature is enabled, only operator users can use this API.

## Required authorization

* Cluster privileges: `manage`

[Read the reference documentation](https://www.elastic.co/guide/en/kibana/8.19/managing-licenses.html)

## Query String Parameters

- `master_timeout` (string Duration · default: 30s)
  The period to wait for a connection to the master node.
- `timeout` (string Duration · default: 30s)
  The period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

## Response

`application/json`

- `acknowledged` (boolean)
  For a successful response, this value is always true. On failure, an exception is returned instead.
## Code Examples

#### Console

```console
DELETE /_license
```

#### JavaScript

```javascript
const response = await client.license.delete();
```

#### Python

```python
resp = client.license.delete()
```

#### curl

```curl
curl -X DELETE "$ELASTICSEARCH_URL/_license" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.license().delete(d -> d);
```

#### C#

```c#
var response = await client.LicenseManagement.DeleteAsync();
```

#### PHP

```php
$resp = $client->license()->delete();
```

#### Ruby

```ruby
response = client.license.delete
```

