---
type: api
title: Delete a package policy
description: Delete a package policy by ID.<br/><br/>[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-delete-fleet-package-policies-packagepolicyid
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v0/operation/operation-delete-fleet-package-policies-packagepolicyid
products:
  - Kibana
---

# Delete a package policy

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

## Paths

- `DELETE` `/api/fleet/package_policies/{packagePolicyId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v0/authentication#basicauth)

#### Path Parameters

- `packagePolicyId` (string)
  The ID of the package policy

## Description

Delete a package policy by ID.<br/><br/>[Required authorization] Route required privileges: fleet-agent-policies-all AND integrations-all.

## Query String Parameters

- `force` (boolean)
  When true, delete the package policy even if it is managed

## Responses

#### `200`

Successful response

`application/json`

- `id` (string)
#### `400`

Bad Request

`application/json`

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

#### Console

```console
DELETE /api/fleet/package_policies/{packagePolicyId}
```

#### curl

```curl
curl -X DELETE "https://{kibana_url}/api/fleet/package_policies/{packagePolicyId}" \
  -H "kbn-xsrf: true"
```

## Response Examples

#### Delete package policy

The package policy was successfully deleted

```json
{
  "id": "package-policy-id-1"
}
```

#### Generic error response

Example of a generic error response

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

