Skip to content
You're viewing documentation for v2026.11.12-beta. It may be out of date.Go to latest
TimescaleDB Enterprise
Esc
↑↓navigate↵open⌘Jpreview

Remove unused packages

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/{name}. 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
Authorization
tse_sessionAPI key · cookierequired
Responses
200

OK

keptPackKept[]required

The packs that the cleanup kept, with the reason: a server installed packages from the pack, or the removal guard refuses its removal

Show properties
Array of PackKept
namestringrequired
reasonstringrequired
loses_serversstring[]

The enrolled servers with nothing deployed that had server packages before the cleanup and have none after it. The create wizard asks for their server packages again

packsPackResponse[]required

The packs after the cleanup

Show properties
Array of PackResponse
archstringrequired
Allowed:amd64arm64
componentsPackComponentResponse[]required

The server components of a components pack, with their versions. Empty for an OS pack

Show properties
Array of PackComponentResponse
namestringrequired
postgresql_majorstring

The PostgreSQL major of tsdbe

versionstringrequired
installed_onPackInstalledOnResponserequired

The servers that installed packages from this pack, and their deployed services. For a components pack, the servers of its architecture that run a component version whose newest loaded source is this pack (TSE-1047, TSE-1094). POST /packs/remove-unused keeps the pack while this list has a server

Show properties
serversstring[]required

The servers that installed packages from the pack: a workflow started the package step on the server while the pack was the newest base pack of the server. The packages stay on the server after the removal of the pack

servicesstring[]required

The deployed services of these servers

kindstringrequired
Allowed:baseextensionscomponents
namestringrequired

Pack name, without .tar.zst

older_releasebooleanrequired

The pack is of a release older than the console (TSE-953). Always false on a dev console

osstringrequired

debian, ubuntu or el. Empty for a components pack

os_versionstringrequired

Empty for a components pack

pinned_bystring[]required

The services that pin this pack: their PostgreSQL servers install from it. Empty for a components pack

postgresqlPackPGResponse[]required
Show properties
Array of PackPGResponse
majorstringrequired
minorstringrequired
timescaledbstring[]required
reasonstring

Why the console rejected the pack

releasestringrequired
remove_loses_serversstring[]

The enrolled servers with nothing deployed that have no server packages after the removal of this pack. The create wizard asks for their server packages again

remove_refusalstring

Why the console refuses to remove the pack now; empty when an admin can remove it

size_bytesinteger<int64>required
verifiedbooleanrequired
removedstring[]required

The packs that the cleanup removed

default

Error

codestring

Stable code of the refusal, when the route has codes

detailsstring[]

Additional detail, e.g. per-field validation failures

errorstringrequired

Human-readable error message

Request
curl -X POST 'https://console.example.com/api/v1/packs/remove-unused' \
  -H 'Cookie: tse_session=YOUR_API_KEY' \
  -H 'Accept: application/json'
Response
{
  "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"
  ]
}