# dflow upgrade

> Replace this dflow binary with the latest published release, or report that it is current.

Web page: /docs/cli/setup/upgrade/

This replaces the `dflow` binary with the latest published release. `--check` only prints your version and the latest one. It does not download anything.

```bash
dflow upgrade
dflow upgrade --check
```

## Flags

`--check` is optional. The usual global flags still apply.

## What you see

The terminal prints `dflow vX.Y.Z is current`, or the new version after a swap. `--check` prints `current` and `latest`. Exit 0 when you are already current, or after the binary is replaced.

## When it fails

A version of `dev` exits 1 and does not download. A checksum mismatch exits 1 and keeps the old binary. Exit 1 also covers a path that cannot be written. Exit 10 when GitHub cannot be reached.
