LogoFlux Docs
Commands

flux update

Update one or more dependencies to their latest compatible or latest available versions using Flux.


Overview

The flux update command upgrades the specified packages — or all dependencies — to their latest versions. It ensures updates are safe, deterministic, and fast, thanks to Flux's lockfile strategy.


Usage

Terminal
flux update [package-name...]

Examples

Update Specific Packages

Terminal
flux update react react-dom

This upgrades react and react-dom to their latest versions as allowed by the version range in package.json.

Update All Packages

Terminal
flux update

This upgrades all dependencies listed in package.json to their latest compatible versions.


Options

OptionDescription
--latestForce update to latest version, ignoring range
--devOnly update devDependencies
--checkShow available updates without applying them
--interactivePrompt before applying each update

How It Works

Scans current versions

Flux reads your package.json and compares it with the latest versions available.

Applies version rules

Flux respects semver ranges unless --latest is used.

Updates package.json and flux.lock

Ensures both reflect the updated versions and remain in sync.

Installs updated dependencies

Flux installs only the changed packages, not the whole tree.


Performance

Thanks to its smart diffing and deterministic resolution, flux update is significantly faster than npm update and yarn upgrade.