Skip to content

apm self-update

Self-update the APM CLI binary to the latest GitHub release.

Terminal window
apm self-update [--check]

apm self-update upgrades the APM CLI itself to the latest version published on GitHub releases. It downloads the official platform installer (install.sh on macOS/Linux, install.ps1 on Windows) and runs it in place.

The command compares the installed version against the latest GitHub release and exits early if you are already current. With --check, it reports availability without installing.

FlagDescription
--checkOnly check whether a newer release exists. Print the result and exit without installing.

Check for an available update:

Terminal window
apm self-update --check

Install the latest release:

Terminal window
apm self-update

Version check. Fetches the latest release tag from GitHub and compares it to apm --version. If the installed version is current, the command exits with a success message and does nothing else.

Download. When an update is available (and --check is not set), the platform installer is downloaded into APM’s temp directory, made executable, and invoked as a subprocess. The installer’s stdout and stderr stream directly to your terminal so it can prompt for elevation when needed.

The installer writes to the same location the install script uses — by default /usr/local/bin/apm on macOS/Linux, and a %LOCALAPPDATA%\Programs\apm\bin\apm.cmd shim pointing at the staged Windows release binary. Existing configuration under ~/.apm/ and your project files are untouched.

Restart your terminal (or re-resolve apm on PATH) and run apm --version to confirm the new version is active.

APM does not keep previous binaries. To roll back, reinstall a specific version using the manual installer:

Terminal window
# macOS / Linux
curl -sSL https://aka.ms/apm-unix | sh
# Windows (PowerShell)
powershell -ExecutionPolicy Bypass -c "irm https://aka.ms/apm-windows | iex"

The installer scripts accept a version pin via environment variable — see Quickstart.

If GitHub is unreachable, the download fails, or the installer exits non-zero, apm self-update exits with code 1 and prints the manual update command. Your existing binary is unaffected.

APM checks for new releases at most once per day during normal command execution. When a newer version is available, you see:

A new version of APM is available: 0.7.0 (current: 0.6.3)
Run apm self-update to upgrade

The check is cached and non-blocking. It is suppressed in distributions that disable self-update.

  • apm update — refresh dependencies declared in apm.yml against the latest matching refs.
  • apm install — install dependencies; use --frozen for read-only, lockfile-pinned installs.
  • Quickstart — first-time install.