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
flux update [package-name...]Examples
Update Specific Packages
flux update react react-domThis upgrades react and react-dom to their latest versions as allowed by the version range in package.json.
Update All Packages
flux updateThis upgrades all dependencies listed in package.json to their latest compatible versions.
Options
| Option | Description |
|---|---|
--latest | Force update to latest version, ignoring range |
--dev | Only update devDependencies |
--check | Show available updates without applying them |
--interactive | Prompt 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.
Related Commands
flux install– Install dependenciesflux outdated– List outdated packagesflux reinstall– Clean reinstall of all dependencies