How to Update Dependencies with bun outdated and bun update
To update dependencies in a Bun project, list the ones with newer versions using bun outdated, then upgrade them with bun update. Running bun update without options only upgrades within the ranges written in package.json (such as ^4.0.0 or ~1.11.0). Crossing a major version happened only when I used --latest.
I wanted to do the work that npm outdated and npm update do, but with Bun, so I checked which command changes what in package.json and bun.lock. I created a project in the test environment with deliberately old versions installed, ran each command one at a time, and checked the output and the package.json diffs.
The test environment was Ubuntu 24.04 (x86_64) with Bun 1.4.4. I fetched packages from the default registry (registry.npmjs.org) on November 15, 2026. The Latest numbers in the tables are the latest versions at that time. I did not test --filter and --recursive in a monorepo using workspaces, catalog, bun update -g, Windows, or macOS.
The test project
The project has five dependencies. I installed older versions by specifying them, such as bun add zod@3.22.0, and then changed the package.json specifiers to common range styles. Only ms is left as a fixed version, not a range.
{
"name": "update-app",
"private": true,
"dependencies": {
"chalk": "^4.0.0",
"dayjs": "~1.11.0",
"ms": "2.1.1",
"zod": "^3.22.0"
},
"devDependencies": {
"typescript": "~5.4.2"
}
}
Running bun install in this state prints "Saved lockfile", but the installed versions do not change. The bun.lock records also stay as they were: zod at 3.22.0, chalk at 4.0.0, and so on.
$ bun install
bun install v1.4.4 (38afee6c8)
Saved lockfile
Checked 10 installs across 11 packages (no changes) [1.00ms]
List outdated dependencies with bun outdated
Running bun outdated in the project folder shows a table of dependencies that have newer versions.
$ bun outdated
bun outdated v1.4.4 (38afee6c8)
┌──────────────────┬─────────┬─────────┬─────────┐
│ Package │ Current │ Update │ Latest │
├──────────────────┼─────────┼─────────┼─────────┤
│ chalk │ 4.0.0 │ 4.1.2 │ 6.0.1 │
├──────────────────┼─────────┼─────────┼─────────┤
│ dayjs │ 1.11.0 │ 1.11.23 │ 1.11.23 │
├──────────────────┼─────────┼─────────┼─────────┤
│ ms │ 2.1.1 │ 2.1.1 │ 2.1.3 │
├──────────────────┼─────────┼─────────┼─────────┤
│ zod │ 3.22.0 │ 3.25.76 │ 4.6.7 │
├──────────────────┼─────────┼─────────┼─────────┤
│ typescript (dev) │ 5.4.2 │ 5.4.5 │ 7.0.2 │
└──────────────────┴─────────┴─────────┴─────────┘
According to the official bun outdated documentation, the three columns mean the following:
- Current: the version currently installed
- Update: the newest version within the range written in package.json
- Latest: the version tagged
latestin the registry
The table shows how far bun update will go. zod is ^3.22.0, so it stops at 3.25.76 within 3.x and does not reach 4.6.7. dayjs is ~1.11.0, so it moves within 1.11.x and reaches the newest 1.11.23. ms is a fixed version with no other versions in its range, so its Update stays at 2.1.1. Dependencies in devDependencies are marked with (dev).
In a terminal, the Update and Latest numbers are colored starting from the digit that changes. In this test, a major bump such as 6.0.1 was red, a minor bump such as chalk's "1.2" was yellow, and a patch-only bump such as dayjs's "23" was green.

When the output is piped to another command (bun outdated | cat), the table borders become | and - characters and no colors are shown. The column contents are the same.
To narrow down which dependencies are checked, pass names as arguments. Patterns with * also work, and a pattern prefixed with ! removes matching dependencies from the table.
$ bun outdated 'z*'
bun outdated v1.4.4 (38afee6c8)
┌──────────┬─────────┬─────────┬────────┐
│ Package │ Current │ Update │ Latest │
├──────────┼─────────┼─────────┼────────┤
│ zod │ 3.22.0 │ 3.25.76 │ 4.6.7 │
└──────────┴─────────┴─────────┴────────┘
With bun outdated '!typescript', the four dependencies other than typescript were listed. Also, even when outdated dependencies appear in the table, the exit code of bun outdated was 0.
Preview the update with bun update –dry-run
Adding --dry-run to bun update only shows which dependencies would be updated to which versions.
$ bun update --dry-run
bun update v1.4.4 (38afee6c8)
↑ chalk 4.0.0 → 4.1.2 (v6.0.1 available)
↑ dayjs 1.11.0 → 1.11.23
↑ typescript 5.4.2 → 5.4.5 (v7.0.2 available)
↑ zod 3.22.0 → 3.25.76 (v4.6.7 available)
4 packages would be updated [285.00ms]
(v6.0.1 available) means there is a newer major version outside the range. I compared the sha256 hashes of package.json and bun.lock before and after running the command, and neither had changed. The zod installed in node_modules also stayed at 3.22.0.
Update within the package.json ranges with bun update
Running bun update zod with a name updated only zod.
$ bun update zod
bun update v1.4.4 (38afee6c8)
↑ zod 3.22.0 → 3.25.76 (v4.6.7 available)
1 package installed [103.00ms]
Comparing with the package.json I saved before running the command, the zod line had been rewritten.
$ diff ../p0.json package.json
8c8
< "zod": "^3.22.0"
---
> "zod": "^3.25.76"
Not only does the installed version go up, but the lower bound of the range in package.json also changes to ^3.25.76 to match the installed version. The official bun update documentation says that ^ and ~ are kept and only the version number is rewritten.
Next, running bun update without a name upgraded the remaining dependencies together.
$ bun update
bun update v1.4.4 (38afee6c8)
↑ typescript 5.4.2 → 5.4.5 (v7.0.2 available)
↑ chalk 4.0.0 → 4.1.2 (v6.0.1 available)
↑ dayjs 1.11.0 → 1.11.23
3 packages installed [241.00ms]
$ diff ../p1.json package.json
5,6c5,6
< "chalk": "^4.0.0",
< "dayjs": "~1.11.0",
---
> "chalk": "^4.1.2",
> "dayjs": "~1.11.23",
11c11
< "typescript": "~5.4.2"
---
> "typescript": "~5.4.5"
dayjs and typescript, written with ~, keep ~, and chalk, written with ^, keeps ^. ms, a fixed version, stayed at 2.1.1 in both package.json and bun.lock. The official documentation also says that bun update does not rewrite a fixed version in package.json. In bun.lock, the records changed to chalk@4.1.2, dayjs@1.11.23, typescript@5.4.5, and zod@3.25.76.
Afterward, bun outdated no longer lists dayjs, which is now at the newest version within its range. Running bun update again printed "Checked 10 installs across 11 packages (no changes)" and nothing changed.
Update to major versions with –latest
To update past the range in package.json to the latest version, add --latest (-L). Combining it with --dry-run and no names showed that the four dependencies other than dayjs, which was already at the latest version, would be updated to their latest versions, including major versions outside their ranges.
$ bun update --latest --dry-run
bun update v1.4.4 (38afee6c8)
↑ chalk 4.1.2 → 6.0.1
↑ ms 2.1.1 → 2.1.3
↑ typescript 5.4.5 → 7.0.2
↑ zod 3.25.76 → 4.6.7
4 packages would be updated [548.00ms]
If you run bun update --latest without a name, in this example zod goes from 3 to 4 and typescript goes from 5 to 7, all at once, past their ranges. Before updating, check with --dry-run which dependencies and versions will change. If there are some you don't want to update, narrow the update by naming the dependencies you want, as shown below.
Running bun update chalk --latest with a name updated only chalk to 6.0.1, and package.json was rewritten to ^6.0.1. Next, I ran --latest on ms, the fixed version. The diff compares against the package.json I saved before updating chalk, so the chalk line appears too.
$ bun update ms --latest
bun update v1.4.4 (38afee6c8)
↑ ms 2.1.1 → 2.1.3
1 package installed [35.00ms]
$ diff ../p2.json package.json
5c5
< "chalk": "^4.1.2",
---
> "chalk": "^6.0.1",
7c7
< "ms": "2.1.1",
---
> "ms": "2.1.3",
A fixed version is rewritten only when --latest is used, and it stays fixed (no ^ is added).
Choose dependencies to update with bun update -i
If you want to choose which dependencies to update on screen, use bun update -i (--interactive). Using a copy of the first project, the screen below shows dayjs selected after moving to it with the ↓ key and pressing the Space key.

Dependencies are listed under dependencies and devDependencies, and three versions are shown: Current, Target, and Latest. Target is the version within the range, the same number as Update in bun outdated. ms, the fixed version, also appears in the list with its Target still at 2.1.1.
Pressing Enter in this state updated only the selected dayjs. Here is the text printed after pressing Enter:
✓ Selected 1 package to update
Installing updates...
🔒 Saving lockfile...
↑ dayjs 1.11.0 → 1.11.23
1 package installed [12.00ms]
In package.json only dayjs changed to ~1.11.23, and the other dependencies kept their original specifiers. According to the official docs, pressing a on this screen selects all. Pressing l switches the target version of the dependency under the cursor between Target and Latest. Pressing Ctrl+C exits without updating anything.




