---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Runs DROP EXTENSION on the live… Reference for the POST
    /api/v1/database-services/{id}/extensions/{name}/drop endpoint in the
    TimescaleDB Enterprise API.
sidebar:
  label: Drop an extension
  badge: POST
title: Drop an extension
type: openapi-operation
---
Runs DROP EXTENSION on the live leader, in the database of the extension, and removes the extension and its stored version from the list of the service. confirm must be the name of the extension. Without cascade, an extension with dependents gets 409 with the dependents. With cascade, the drop also drops them (DROP EXTENSION ... CASCADE): their data is lost. A required extension gets 400. When the extension has a preload library, deploy the service to remove it from shared_preload_libraries.

`POST /api/v1/database-services/{id}/extensions/{name}/drop`

**Request body** (`application/json`, required)

- `cascade` (boolean) — Also drop the objects that depend on the extension (DROP EXTENSION ... CASCADE).
- `confirm` (string, required) — The catalog name of the extension, again.

Request body example:

```json
{
  "cascade": true,
  "confirm": "string"
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "also_dropped": [
    "string"
  ],
  "cascade": true,
  "database": "string",
  "dependents": [
    {
      "estimated_rows": 0,
      "name": "string",
      "table": "string",
      "type": "string"
    }
  ],
  "deploy_needed": true,
  "dropped": true,
  "extension": "string",
  "more": 0
}
```
