Checking for outdated packages
Usebun outdated to see which installed packages have newer versions available:
Updating packages
Update all packages
bun update updates each package to the latest version that satisfies the version range in package.json. The package.json ranges themselves are not modified.
For example, if package.json specifies "react": "^17.0.2", running bun update installs the latest 17.x release but does not upgrade to 18.x.
Update a specific package
Update beyond semver constraints
Use--latest to update to the absolute latest version, ignoring your package.json version ranges. This may include major version bumps.
package.json version ranges are rewritten to the new version.
Interactive update
Use--interactive (or -i) for a terminal UI that lets you select exactly which packages to update:
| Key | Action |
|---|---|
Space | Toggle selection |
Enter | Confirm and update selected packages |
a | Select all |
n | Select none |
i | Invert selection |
l | Toggle between target and latest version for the current package |
↑ / ↓ | Move cursor |
Ctrl+C | Cancel without updating |
Interactive update across workspaces
Use--recursive with --interactive to update dependencies across all workspaces in a monorepo:
Why is a package installed?
Usebun pm why to understand why a package appears in node_modules:
package.json to the package, showing which packages depend on it.
Listing installed packages
Usebun pm ls to list all installed dependencies and their resolved versions:
--all to include transitive dependencies: