apm update
Refresh the dependencies declared in apm.yml to the latest matching Git refs, after showing you the plan and asking for consent.
Synopsis
Section titled “Synopsis”apm update [OPTIONS]Description
Section titled “Description”apm update re-resolves every dependency in your project’s apm.yml against the newest Git ref allowed by its constraint, prints a structured plan — added, updated, removed, unchanged — and prompts before touching anything. Decline the prompt and APM exits cleanly: no lockfile writes, no filesystem changes.
This is the dependency-refresh command. To upgrade the APM CLI binary itself, see apm self-update.
For a read-only install that pins to whatever is already in apm.lock.yaml — the right command for CI — use apm install --frozen.
Options
Section titled “Options”| Flag | Default | Description |
|---|---|---|
--yes, -y | off | Skip the interactive prompt and accept the plan. Required for non-interactive use. |
--dry-run | off | Compute and print the plan without prompting and without writing the lockfile or filesystem. |
--verbose, -v | off | Show per-dependency resolution detail (old ref, new ref, source) and full error context. |
Examples
Section titled “Examples”Preview what would change, without prompting or writing:
apm update --dry-runInteractively review and accept the plan:
apm update# prints plan, prompts: Apply these updates? [y/N]Accept non-interactively (CI, scripts):
apm update --yesDecline the prompt — nothing is written:
apm update# Apply these updates? [y/N] n# Aborted. apm.lock.yaml unchanged.Behavior
Section titled “Behavior”- Re-resolve every dep. Each entry in
apm.ymlis resolved against its remote source for the newest ref allowed by the constraint (branch tip, latest matching tag, etc.). Local-path deps are skipped. - Structured plan. Output is grouped into four sections:
- added — present in the new resolution but not in the previous lockfile.
- updated — ref or version moved.
- removed — previously locked, no longer required by
apm.yml. - unchanged — already at the latest matching ref.
- Consent gate. The prompt defaults to No. Without
--yes, declining (or running in a non-interactive context) aborts with a clean exit; the lockfile and workspace are untouched. - No partial writes. The plan is applied atomically: either the new
apm.lock.yamlis written andapm installis invoked to materialize the result, or nothing changes. --dry-runskips the prompt. It only computes and prints the plan; it never writes and never asks.
Back-compat: apm update used to be the self-updater
Section titled “Back-compat: apm update used to be the self-updater”In earlier releases, apm update self-updated the APM CLI binary. That behavior moved to apm self-update and apm update was repurposed as the dependency updater described above.
For one release after the rename, running apm update from a directory without an apm.yml prints a deprecation banner and forwards to apm self-update so existing muscle memory and scripts keep working. This shim is removed in the next minor release — update your scripts to call apm self-update directly.
Related
Section titled “Related”apm install --frozen— read-only install pinned toapm.lock.yaml; fails on drift. Use this in CI.apm self-update— upgrade the APM CLI binary itself.apm outdated— report dependencies with newer refs available, without changing anything.- Manage dependencies (consumer guide) — task-oriented walkthrough.
- Update and refresh — when to use
update,install --frozen, andself-update.