---
search:
  tags:
    - system
    - POST
seo:
  description: >-
    Removes each pack that no server installed packages from… Reference for the
    POST /api/v1/packs/remove-unused endpoint in the TimescaleDB Enterprise API.
sidebar:
  label: Remove unused packages
  badge: POST
title: Remove unused packages
type: openapi-operation
---
Removes each pack that no server installed packages from (installed_on in GET /packs is empty), of each release, also the newest pack of a server, with the guard of DELETE /packs/&#123;name&#125;. Of two packs for the same used servers, it keeps the newer one. The response lists the removed packs, and the kept packs with the reason.

`POST /api/v1/packs/remove-unused`

**Responses**

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

Response example, 200:

```json
{
  "kept": [
    {
      "name": "string",
      "reason": "string"
    }
  ],
  "loses_servers": [
    "string"
  ],
  "packs": [
    {
      "arch": "amd64",
      "components": [
        {
          "name": "string",
          "postgresql_major": "string",
          "version": "string"
        }
      ],
      "installed_on": {
        "servers": [
          "string"
        ],
        "services": [
          "string"
        ]
      },
      "kind": "base",
      "name": "string",
      "older_release": true,
      "os": "string",
      "os_version": "string",
      "pinned_by": [
        "string"
      ],
      "postgresql": [
        {
          "major": "string",
          "minor": "string",
          "timescaledb": [
            "string"
          ]
        }
      ],
      "reason": "string",
      "release": "string",
      "remove_loses_servers": [
        "string"
      ],
      "remove_refusal": "string",
      "size_bytes": 0,
      "verified": true
    }
  ],
  "removed": [
    "string"
  ]
}
```
