# argoctl ironic uninstall

Source: https://argoctl-docs.pages.dev/docs/reference/cli/ironic-uninstall

> Remove Ironic's containers from the management server, and with --purge its database, secrets and images.

## Synopsis

```bash
sudo argoctl ironic uninstall [--purge] [--json]
```

## Description

Stops and removes the `argo-ironic` Compose project's containers. Installed nodes keep running: Ironic only manages installation and power, and the operating systems don't depend on it.

With **`--purge`** it also deletes Ironic's database, secrets and downloaded images (`/etc/argoctl/ironic/` and `/var/lib/argoctl/ironic/`). **Ironic then forgets every node.** Installing Ironic again works, but nodes that were already installed can only be brought back under Ironic by reinstalling them (`provision --reimage --node <name>`).

Docker, mgmt's provisioning SSH key, the cluster and its state are left alone.

## Flags

| Flag | Default | |
|---|---|---|
| `--purge` | | Also delete the database, secrets and images. |
| `--json` | | Print the report as JSON on stdout. |

## Examples

```bash
sudo argoctl ironic uninstall              # containers only; reinstall with `ironic install`
sudo argoctl ironic uninstall --purge      # everything Ironic stores
```

## Output

```text
$ sudo argoctl ironic uninstall
✓ Ironic removed: containers httpd, ironic, mariadb (4s)
  kept: database and images under /var/lib/argoctl/ironic, secrets under /etc/argoctl/ironic (--purge removes them)
  Full log: /var/log/argoctl/20261130T110002Z-ironic-uninstall.log
```

## Exit codes

| Code | Meaning |
|---|---|
| `0` | Removed (or nothing was installed). |
| `1` | Something couldn't be removed. |
| `2` | Usage error. |

## Troubleshooting

| Symptom | Likely cause and fix |
|---|---|
| `must run as root` | `sudo argoctl ironic uninstall`. |
| After `--purge`, `provision` says a node `isn't in Ironic, but ... already answers SSH` | Expected: Ironic forgot the node. `provision --reimage --node <name>` reinstalls it under Ironic (wipes its disk). Nodes you don't need to reinstall can be left as they are. |
