upgrade
Checks for newer versions of Unsterwerx and installs them. The upgrade process downloads the latest release tarball and replaces the current binary.
Usage
bash
unsterwerx upgrade [OPTIONS]
Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--check | flag | Check for updates only (does not install) | ||
--force | flag | Re-download and reinstall even if already up to date | ||
--from-file | path | Upgrade from a local tarball for offline/air-gapped environments | ||
--checksum | string | SHA-256 checksum for --from-file verification. Required unless an adjacent SHA256SUMS file exists |
Examples
Check for updates
bash
unsterwerx upgrade --check
Checking for updates...
Installed: 0.4.4
Latest: 0.4.4
Already up to date (0.4.4).
Upgrade to latest
bash
unsterwerx upgrade
Force reinstall
bash
unsterwerx upgrade --force
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Already up to date (with --check) or upgrade successful |
| 1 | Update available (with --check) or upgrade failed |
| 2 | Update server unreachable (network error during --check) |
Notes
- The
--checkflag returns exit code 1 when an update is available. This is useful for scripting:unsterwerx upgrade --check || unsterwerx upgrade. - The upgrade downloads from
https://unsterwerx.run/releases/and requires network access. - If the target directory (
/usr/local/bin/) is not writable, the upgrade falls back tosudo. - Use
--forceto reinstall the same version, useful for repairing a corrupted binary. - Use
--from-filewith a local tarball for offline or air-gapped deployments. Pair with--checksumfor integrity verification, or place aSHA256SUMSfile alongside the tarball. - Set
UNSTERWERX_UPGRADE_URLto override the upgrade endpoint base URL for air-gapped or mirrored deployments. Default:https://unsterwerx.run.