# Update OSMates

Get new versions of OSMates, choose whether betas come too, and finish an update while machines run.

## Check for updates

Choose **OSMates > Check for Updates**. If a newer version is out, OSMates shows its release notes. Click **Install Update** to get it.

Only the official app checks for updates. It asks downloads.osmates.com, which sends the check on to GitHub, where every release is. A [build from source](https://osmates.com/docs/build-from-source) never checks.

A Mac with Pro gets only the releases its year of updates covers. With early access, that's every beta until OSMates 1.0, then a year. See [Pro's year of updates](https://osmates.com/docs/editions#pros-year-of-updates).

## Change automatic updates

Choose **OSMates > Settings**, then click **Updates** in the sidebar.

| Switch | Default | When on |
|---|---|---|
| Check for updates automatically | On once the welcome window opens | OSMates checks once a day |
| Download and install updates automatically | Off | OSMates downloads an update and installs it when you quit |

To check now, click **Check Now**. Last checked shows when the last check ran.

## Choose beta versions

Betas come before a release, to try what it changes. Include beta versions is on in a beta of OSMates and off in a release, until you change it.

1. Choose **OSMates > Settings**, then click **Updates** in the sidebar.
2. Turn **Include beta versions** on or off.

With it off, a beta gets no update until a newer release comes out.

## Finish an update with machines running

Open the new version to finish the update. With no machine or job running, it finishes on its own. Otherwise, Finish Updating OSMates lists what still runs:

1. Under **What Happens**, choose **Suspend**, **Shut Down**, or **Wait** for each machine.
2. Choose **Wait** or **Cancel** for each job.
3. Click **Finish Update**.

Suspend is the default when a machine supports it and there's room to save its memory. Click **Later** to finish another time from the library or the [menu bar](https://osmates.com/docs/app#use-the-menu-bar).

Suspended and shut-down machines start again after the update, with their windows restored. Until the update finishes, `osmates` commands exit with code 75 and say what still runs.

## Finish an update from Terminal

Requires [OSMates Pro](https://osmates.com/docs/editions#what-pro-adds).

On a Mac nobody sits at, run this in the logged-in user's session:

```sh
/Applications/OSMates.app/Contents/MacOS/OSMates --finish-update
```

The command applies the default choice to each machine and job. To pick one, add `--choose <id>=<choice>` with `suspend`, `shutDown`, `wait`, or `cancel`. `osmates status` lists each ID and the choices it offers.

The command exits with 0 once every machine is back, and 1 when the update fails. A choice that a machine or job doesn't offer gives 64.

Over ssh, start the app in the user's session, then check the result:

```sh
open -n -W -a OSMates --args --finish-update
osmates status
```

`open` doesn't pass on the app's exit code, so `osmates status` is the check.

## If an update breaks a machine

[Revert the machine to its snapshot from before the update](https://osmates.com/docs/snapshots#recover-after-an-osmates-update).

To return to the version you had, see [Go back to an earlier version](https://osmates.com/docs/snapshots#go-back-to-an-earlier-version).
