Skip to main content
Update dependencies to their latest versions.

Behavior

bun update updates packages to the latest versions that satisfy the version ranges in package.json. The lockfile is updated to reflect the new versions.

Update all packages

Updates all dependencies in package.json.

Update specific packages

Updates only the specified package(s).

Arguments

Package name

Multiple packages

Scoped packages

Flags

--latest

Update to the absolute latest version, ignoring semver ranges in package.json.
This updates all packages to their latest versions and modifies package.json with new version ranges.

--interactive (-i)

Interactively select which packages to update.
Displays an interactive prompt:

--no-save

Update packages without modifying package.json.

--cwd <path>

Run command in specified directory.

--ignore-scripts

Skip running lifecycle scripts during update.

--dry-run

Simulate update without actually installing anything.
Shows what would be updated:

--verbose

Enable verbose logging.

--silent

Suppress all output except errors.

Examples

Update all dependencies

Update specific package

Update to latest versions

Interactive update

Checking for outdated packages

To see which packages have available updates without installing them:
See bun outdated for details.

Version ranges

bun update respects semver ranges in package.json: Use --latest to ignore these ranges and update to the absolute latest version.

Workspaces

In workspace projects, bun update updates dependencies across all workspaces:
Update dependencies in a specific workspace:

Aliases

These commands are equivalent: