terminal
terminal
--interactive
For a more controlled update experience, use the --interactive flag to select which packages to update:
terminal
Interactive Interface
The interface displays packages grouped by dependency type:terminal
- Packages are grouped under section headers:
dependencies,devDependencies,peerDependencies,optionalDependencies - Each section shows column headers aligned with the package data
- Package: Package name (may have suffix like
dev,peer,optionalfor clarity) - Current: Currently installed version
- Target: Version that would be installed (respects semver constraints)
- Latest: Latest available version
Keyboard Controls
Selection:- Space: Toggle package selection
- Enter: Confirm selections and update
- a/A: Select all packages
- n/N: Select none
- i/I: Invert selection
- ↑/↓ Arrow keys or j/k: Move cursor
- l/L: Toggle between target and latest version for current package
- Ctrl+C or Ctrl+D: Cancel without updating
Visual Indicators
- ☑ Selected packages (will be updated)
- □ Unselected packages
- > Current cursor position
- Colors: Red (major), yellow (minor), green (patch) version changes
- Underlined: Currently selected update target
Package Grouping
Packages are organized in sections by dependency type:- dependencies - Regular runtime dependencies
- devDependencies - Development dependencies
- peerDependencies - Peer dependencies
- optionalDependencies - Optional dependencies
dev, peer, optional) for extra clarity.
--recursive
Use the --recursive flag with --interactive to update dependencies across all workspaces in a monorepo:
terminal
--latest
By default, bun update will update to the latest version of a dependency that satisfies the version range specified in your package.json.
To update to the latest version, regardless of if it’s compatible with the current version range, use the --latest flag:
terminal
package.json:
package.json
bun updatewould update to a version that matches17.x.bun update --latestwould update to a version that matches18.xor later.
CLI Usage
terminal
Update Strategy
Always request the latest versions from the registry & reinstall all dependencies. Alias:
-fUpdate packages to their latest versions
Dependency Scope
Don’t install devDependencies. Alias:
-pInstall globally. Alias:
-gExclude
dev, optional, or peer dependencies from installProject File Management
Write a
yarn.lock file (yarn v1). Alias: -yDon’t update
package.json or save a lockfileSave to
package.json (true by default)Disallow changes to lockfile
Save a text-based lockfile
Generate a lockfile without installing dependencies
Network & Registry
Provide a Certificate Authority signing certificate
Same as
—ca, but as a file path to the certificateUse a specific registry by default, overriding
.npmrc, bunfig.toml and
environment variablesMaximum number of concurrent network requests (default 48)
Caching
Store & load cached data from a specific directory path
Ignore manifest cache entirely
Output & Logging
Don’t log anything
Excessively verbose logging
Disable the progress bar
Don’t print a summary
Script Execution
Skip lifecycle scripts in the project’s
package.json (dependency scripts are never
run)Maximum number of concurrent jobs for lifecycle scripts (default 5)
Installation Controls
Skip verifying integrity of newly downloaded packages
Add to
trustedDependencies in the project’s package.json and install the
package(s)Platform-specific optimizations for installing dependencies. Possible values:
clonefile (default), hardlink, symlink,
copyfileGeneral & Environment
Specify path to config file (
bunfig.toml). Alias: -cDon’t install anything
Set a specific cwd
Print this help menu. Alias:
-h