> ## 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.

# Remove

Delete an `uninstalled` installation's record and its log. It ends that installation's log (deleting the installer blob
or its organization ends all of them), and it frees the record's place under
`blobhub.package.installer.installations_per_revision` ([Limits](https://docs.blobhub.io/general/limits.md#the-catalog)). An installation that
still has blobs is uninstalled first, with [`uninstall`](https://docs.blobhub.io/blob-types/installer/operations/uninstall).

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

The request checks that the record is `uninstalled`, then 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
([The checks, in order](https://docs.blobhub.io/blob-types/installer/overview.md#the-checks-in-order)).

### Request Body

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

### Response

An empty success: it carries `status` and nothing else.

### Errors

| Status | Error | Cause |
| :- | :- | :- |
| 400 | `app_not_confirmed` | No `confirmed`. The body carries the `lines` the remove 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. |
| 404 | `installation_not_found` | The installer blob holds no installation of that alias. |
| 409 | `installation_not_uninstalled` | The record is not `uninstalled`: its blobs still exist, or an operation on it is running, or it expired and reads as `failed`. The message names the stored status. |
| 409 | `plan_changed` | `confirmed` is not the digest of the remove 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`, `deletes` and `problems` empty. |

The 409 body of `installation_not_uninstalled` carries `problems`, one sentence that starts with the code, as
`installation_not_uninstalled: reports is ready`, and `lines` and `limits`, both empty.

### Example

```json Request theme={null}
{
  "command": "remove",
  "installation": "reports",
  "confirmed": "sha256:1a8b51c164895f11599047db865d84a050cf3631578cbf433cf96680a3a9d7b8"
}
```

```json Response theme={null}
{
  "status": "success"
}
```

### Without confirmation

The same request without `confirmed` writes nothing and answers 400 `app_not_confirmed`, its body carrying the `lines`
the remove would act on, the record and the log it deletes, and their `digest`. Sent again with that digest as
`confirmed`, it removes them. Key off `error`; `message` and the lines are prose, printed as they are.


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