# update

> Update this CLI to the version your Gateway publishes (GET /cli/version).

Update this CLI to the version your Gateway publishes (GET /cli/version).

## nexus update

```sh
nexus update [--check] [--rollback] [--json]
```

Update this CLI to the version your Gateway publishes (GET /cli/version).

| Option | Meaning |
| --- | --- |
| `--check` | Only check; change nothing |
| `--rollback` | Restore the version before the last update |
| `--json` | Print only JSON on stdout |

| Exit code | Meaning |
| --- | --- |
| 0 | Updated, already up to date, rolled back, or (--check) checked |
| 1 | Nothing changed: Gateway unreachable, a checksum mismatch, or this CLI was not installed by Nexus's installer |

```sh
nexus update
nexus update --check --json
nexus update --rollback
```
