---
type: api
title: Delete Kibana assets for a package
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/kibana/operation/operation-delete-fleet-epm-packages-pkgname-pkgversion-kibana-assets
products:
  - Kibana
---

# Delete Kibana assets for a package

- Server: `https://{kibana_url}`

## Paths

- `DELETE` `/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets`
- `DELETE` `/s/{space_id}/api/fleet/epm/packages/{pkgName}/{pkgVersion}/kibana_assets`

#### Path parameters

- `pkgName` (string) — required
  Package name
- `pkgVersion` (string) — required
  Package version

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Delete Kibana assets (dashboards, visualizations, etc.) for a specific package version.

## Required authorization

- Privileges: `integrations-all` and `fleet-agent-policies-all`

## Authentication

- Api key: `Authorization: <value>`
  These APIs use key-based authentication. You must create an API key and use the encoded value in the request header. For example: `Authorization: ApiKey base64AccessApiKey`
- Basic: `Authorization: Basic <credentials>`

## Header parameters

- `kbn-xsrf` (string) — required
  A required header to protect against CSRF attacks

## Responses

#### `200`

Successful response

`application/json`

- `success` (boolean)
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
## Code examples

#### Console

```console
DELETE kbn:/api/fleet/epm/packages/PKG_NAME/PKG_VERSION/kibana_assets
```

#### curl

```curl
curl -X DELETE "${KIBANA_URL}/api/fleet/epm/packages/${PKG_NAME}/${PKG_VERSION}/kibana_assets" \
  -H "kbn-xsrf: true" \
  -H "Authorization: ApiKey ${API_KEY}"
```

## Response examples

#### Delete kibana assets

Kibana assets successfully deleted

```json
{
  "items": [
    {
      "id": "dashboard-id-1",
      "type": "dashboard"
    }
  ]
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

