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

# blobhub installer uninstall

> Delete an installation's blobs and accounts, keeping its record and log

`uninstall` deletes an installation's blobs with their data, and the service accounts it made with their
credentials. The record and its log stay, so the installation can be installed again with
[`install`](https://docs.blobhub.io/cli/installer/commands/install), or deleted with [`remove`](https://docs.blobhub.io/cli/installer/commands/remove). Like `install`
it prints the lines it would act on first, and refuses without `--yes`.

## Synopsis

```bash theme={null}
blobhub installer uninstall <alias> --installer <org>/<blob> [--yes]
```

| Argument or flag | Default | Description |
| - | - | - |
| `<alias>` | required | The installation's alias. |
| `--installer` | required | The installer blob, as `<org>/<blob>`. |
| `--yes` | off | Confirms the lines printed, by sending their digest. Without it the command refuses. |

## What it does

The command sends the platform's [`uninstall`](https://docs.blobhub.io/blob-types/installer/operations/uninstall) once, without confirmation.
The platform answers with the lines it would act on and their digest, and the CLI prints the lines and refuses:

```console theme={null}
blobhub installer uninstall reports --installer acme-corp/installed-apps
```

```text theme={null}
  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
refused: pass --yes to uninstall
```

With `--yes` the command notes the log's last entry, sends the call without confirmation as above, prints the lines it
answers the same way, and sends it again with their digest as `confirmed`, all in one run. It confirms what this run
printed, never the lines of an earlier run without `--yes`. It then follows the log as `install` does, until the
installation is `uninstalled`:

```console theme={null}
blobhub installer uninstall reports --installer acme-corp/installed-apps --yes
```

```text theme={null}
  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
# … the log's first entries: the request, its lines and the account's retirement
16:40:13  deleted blob reports-flows and its data
16:40:14  deleted blob reports-schedules and its data
16:40:14  uninstalled; the record and its log stay
uninstalled; the record and its log are kept
```

The last line is the command's own. When the lines have changed between the two calls, because another operation ran on
the installation, nothing is uninstalled: the platform answers `plan_changed` with what the uninstall would do now, and
the command prints its lines and ends with `refused: the plan changed while it was confirmed; nothing was uninstalled`,
exit `1` (`PLAN_CHANGED`).

An uninstall waits as an upgrade does. While the installation's last migration still runs, or the app's
[busy object](https://docs.blobhub.io/blob-types/installer/overview.md#the-busy-object) says it is busy, the platform refuses the call before it
answers with lines, with or without `--yes`: the command prints the problem as `problem: <text>`, fails with
`MIGRATION_RUNNING` or `APP_BUSY`, and nothing is uninstalled.

A record that is already `uninstalled` is refused after the one call, with or without `--yes`, and waiting never clears
it. The command prints the platform's problem on stdout and fails with `INSTALLATION_UNINSTALLED` on stderr, whose
message is the same sentence:

```text theme={null}
problem: installation_uninstalled: reports is already uninstalled; install it again or remove the record
error: INSTALLATION_UNINSTALLED: installation_uninstalled: reports is already uninstalled; install it again or remove the record
```

Under `--json`, stdout is empty and stderr holds the one refusal document, whose `problems` holds the sentence.

Install it again with [`install`](https://docs.blobhub.io/cli/installer/commands/install), or delete the record with
[`remove`](https://docs.blobhub.io/cli/installer/commands/remove).

An uninstall that retires an account needs a person behind the request. Sent with a service account's key, the
confirmed call is refused with the platform's 403 after the lines are printed, and the command fails with
`BLOB_NOT_ACCESSIBLE`: `cannot uninstall in acme-corp/installed-apps: `, then the platform's own message, or
`the platform refused (HTTP 403) without a message`. See [who installs](https://docs.blobhub.io/cli/installer/overview.md#who-installs).

A delete of the installer blob refuses the uninstall with `BLOB_NOT_READY`, and nothing is uninstalled. When the
delete has claimed the blob before the uninstall's call, the refusal is the platform's
`blob acme-corp/installed-apps is deleting`, with no hint. When it claims the blob while the call runs, the command
prints the platform's problem first, `problem: blob_not_ready: blob installed-apps is being deleted`.

## Errors

| Code | When |
| - | - |
| `APP_NOT_CONFIRMED` | `--yes` was not given. The lines and the refusal line are printed, and the exit code is `1`. |
| `PLAN_CHANGED` | With `--yes`, the lines changed between the two calls. The new ones are printed, and nothing is uninstalled. |
| `MIGRATION_RUNNING`, `APP_BUSY` | The installation's last migration still runs, or its app is busy, with or without `--yes`. The problem is printed, and nothing is uninstalled. |
| `INSTALLATION_NOT_FOUND` | The installer blob holds no installation of that alias. |
| `INSTALLATION_BUSY` | An operation on the alias is running. |
| `INSTALLATION_UNINSTALLED` | The record is already `uninstalled`, with or without `--yes`. The problem is printed, and nothing changes. |
| `INSTALLATION_FAILED`, `INSTALLATION_FOLLOW_TIMEOUT` | The uninstall failed, or did not settle in 30 minutes. |
| `BLOB_NOT_ACCESSIBLE` | The installer blob is absent or not reachable with this key, or the uninstall retires an account and the key is a service account's. A call the platform refuses reads `cannot uninstall in <org>/<blob>: ` and the platform's own message. |
| `BLOB_NOT_READY` | The installer blob is not `ready`; one being deleted or failed is refused with the platform's `blob <org>/<blob> is <status>`, with no hint. A delete that claims it while the call runs refuses the uninstall with a problem, which is printed first. Nothing is uninstalled. |
| `CREDENTIALS_NOT_FOUND`, `PROFILE_NOT_FOUND`, `INSECURE_CREDENTIALS_PERMISSIONS` | No usable credential, a credentials file the CLI refuses to read, or an API URL or key no request can carry ([Error codes](https://docs.blobhub.io/cli/error-codes.md#credentials-and-authentication)). |
| `API_RATE_LIMITED`, `API_TRANSIENT_ERROR`, `API_NETWORK_ERROR` | A call failed after its retries. With `--yes`, `API_TRANSIENT_ERROR` is also lines the CLI cannot read: `cannot read the platform's answer: ...; nothing was uninstalled`, before any of them print. |

Every code above, with its remediation, is in [Error codes](https://docs.blobhub.io/cli/error-codes.md).

## See also

* [Installer overview](https://docs.blobhub.io/cli/installer/overview.md) — the refusal and following the log.
* [`uninstall`](https://docs.blobhub.io/blob-types/installer/operations/uninstall) — the operation behind the command.
* [Uninstall and remove](https://docs.blobhub.io/blob-types/installer/overview.md#uninstall-and-remove) — what each keeps and deletes.
* [`blobhub installer remove`](https://docs.blobhub.io/cli/installer/commands/remove) — deletes the record that remains.


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