> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Uninstall

Delete an installation's blobs with their data, and the service accounts it made with their credentials, keeping its
record and its log. The record ends `uninstalled`, with its inputs; it is installed again with
[`install`](https://docs.blobhub.io/blob-types/installer/operations/install), or deleted with
[`remove`](https://docs.blobhub.io/blob-types/installer/operations/remove).

## **POST** `/revisions/:id/data/command` (Command: `uninstall`)

A record that is already `uninstalled` is refused first, with 409 `installation_uninstalled`. Then the request runs
three of [the checks, in order](https://docs.blobhub.io/blob-types/installer/overview.md#the-checks-in-order): no operation and no migration of
the installation may be running, and the installed version's
[busy object](https://docs.blobhub.io/blob-types/installer/overview.md#the-busy-object), and, after a failed upgrade, the last ready version's
too, may not say the app is busy. Then it confirms by digest, as [`install`](https://docs.blobhub.io/blob-types/installer/operations/install)
does: without `confirmed` it answers `app_not_confirmed` with the `lines` it would act on and their `digest`, and sent
again with that digest, it runs.

It moves a `ready` or `failed` record to `uninstalling` and retires each account the installation made, as
[Lifecycle](https://docs.blobhub.io/general/service-accounts.md#lifecycle) describes: its keys, credentials and memberships go, and its record
stays for attribution. It answers with the record, and a worker deletes the blobs.

### Request Body

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `command` | string | Yes | Must be `uninstall`. |
| `installation` | string | Yes | The installation's alias. |
| `confirmed` | string | Yes | The `digest` its `app_not_confirmed` answered: the caller has seen the lines the uninstall acts on. |

### Response

| Parameter | Type | Description |
| :- | :- | :- |
| `installation` | object | The [record](https://docs.blobhub.io/blob-types/installer/overview.md#installations), `uninstalling`. |

### Errors

| Status | Error | Cause |
| :- | :- | :- |
| 400 | `app_not_confirmed` | No `confirmed`. The body carries the `lines` the uninstall would act on and their `digest`. |
| 400 | `invalid_request_body` | A parameter is missing or has the wrong type. |
| 403 | `forbidden` | The caller does not have ADMIN on the installer blob and on its organization, or the uninstall retires an account and a service account's own key sent it. |
| 404 | `installation_not_found` | The installer blob holds no installation of that alias. |
| 409 | `installation_uninstalled` | The record is already `uninstalled`: `installation_uninstalled: reports is already uninstalled; install it again or remove the record`. |
| 409 | `installation_busy` | An operation on the installation is running: it is `installing` or `uninstalling`; or another request took the record first. A record busy for more than two hours counts as `failed`. |
| 409 | `blob_not_ready` | A delete has claimed the installer blob first. Nothing is written. |
| 409 | `migration_running` | The installation's last migration has not ended ([The migration workflow](https://docs.blobhub.io/blob-types/installer/overview.md#the-migration-workflow)). |
| 409 | `app_busy` | A busy object says the app is busy: the installed version's, and, after a failed upgrade, the last ready version's too ([The busy object](https://docs.blobhub.io/blob-types/installer/overview.md#the-busy-object)). |
| 409 | `plan_changed` | `confirmed` is not the digest of the uninstall planned now. The body is that plan, in the whole shape [`plan`](https://docs.blobhub.io/blob-types/installer/operations/plan#response) answers, with `app` and `from_version` `null` and `inputs`, `limits` and `problems` empty. |

Every 409 body but that of `plan_changed` carries `problems`, `lines` and `limits`. `problems` is one sentence that
starts with the code, as `installation_busy: reports is installing` or `app_busy: reports is busy until
2026-12-03T03:00:00Z: the nightly reports run (acme-corp/reports-flows, session reports, object install/busy)`.
`lines` is empty for `installation_uninstalled`, and for `installation_busy` over a record that is busy; it holds the
lines the uninstall would act on for `migration_running`, `app_busy`, `blob_not_ready`
(`blob_not_ready: blob installed-apps is being deleted`), and `installation_busy` when another request took the record
first. `limits` is always empty. `app_not_confirmed` carries `lines` and `digest`, `plan_changed` the plan, and
`installation_not_found` and `forbidden` only `error` and `message`.

### Example

Sent with the digest that the same request without `confirmed` answered ([below](#without-confirmation)):

```json Request theme={null}
{
  "command": "uninstall",
  "installation": "reports",
  "confirmed": "sha256:af8ecb1851ccdf968be349065c825fa19be7e8dbfc195b0e10796ca9ac1267b5"
}
```

```json Response theme={null}
{
  "status": "success",
  "installation": {
    "alias": "reports",
    "app": "acme-corp/field-reports",
    "version": "0.3.0",
    "revision_id": "8e41c3b7-0d92-4a5f-b6e1-2c7f9a03d58e",
    "status": "uninstalling",
    "operation": "uninstall",
    "development": false,
    "inputs": {"config": {"timezone": "Europe/Oslo", "sites": ["north-yard", "east-depot"]}},
    "blobs": {
      "flows": "1f7d4b20-6c3a-4e89-a5d2-9b0e7c41f366",
      "schedules": "a93e05c8-27f1-4b6d-8e4a-5c1d0f72b9e4"
    },
    "accounts": {"runner": "c4b8e217-9a05-4d3f-b7c6-0e2a51f8d943"},
    "created_at": "2026-11-20T14:20:03.000Z",
    "updated_at": "2026-12-02T16:40:12.000Z"
  }
}
```

When the worker is done, the record is `uninstalled`, its `blobs` and `accounts` are empty, and the log ends with
`uninstalled; the record and its log stay`.

### Without confirmation

The request without `confirmed` writes nothing and answers what the uninstall would act on, and its digest:

```json Request theme={null}
{
  "command": "uninstall",
  "installation": "reports"
}
```

```json Response theme={null}
{
  "status": "failure",
  "error": "app_not_confirmed",
  "message": "…",
  "lines": [
    "deletes blob reports-flows and its data",
    "deletes blob reports-schedules and its data",
    "deletes service account reports-runner and its credentials",
    "keeps the record of reports and its log"
  ],
  "digest": "sha256:af8ecb1851ccdf968be349065c825fa19be7e8dbfc195b0e10796ca9ac1267b5"
}
```

Key off `error`; `message` is prose, shown here as `…`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.