Package manager

bun install
The npm-compatible package manager that finishes first.

It reads your package.json, migrates your lockfile, and installs from a global cache. Keep running your app on Node.js if you like — installs, CI and monorepo workflows just get quicker.

curl -fsSL https://bun.sh/install | bash
View install script ↗

Installing a Next.js app

warm cache · seconds (lower is better)

bun
v1.4
0.21s
yarn
v1.22.22
1.76s
pnpm
v11.21.0
1.92s
npm
v12.0.2
4.45s
T3-stack app, 25 direct dependencies, ~220 packages in the lockfile · warm cache · lockfile present · node_modules removed · Linux x64, EPYC 9R14 · every package manager at defaults · medians of 3reproduce
Installing a Next.js app — T3-stack app, 25 direct dependencies, ~220 packages in the lockfile · warm cache · lockfile present · node_modules removed · Linux x64, EPYC 9R14 · every package manager at defaults · medians of 3
runtimeversioninstall timepeak RAM
bunv1.4210 s12 MB
yarnv1.22.221,760 s205 MB
pnpmv11.21.01,920 s1.4 GB
npmv12.0.24,450 s698 MB

bun install

The fastest install in every situation you actually hit.

Cold cache, warm cache, CI, a no-op reinstall — one T3-stack Next.js app, 25 direct dependencies, ~220 packages in the lockfile, measured six ways against npm, pnpm and yarn at their defaults.

First install, ever
no cache · no lockfile · no node_modules
bun
1.41s
npm
18.12s
pnpm
13.49s
yarn
20.51s
10–15× fasterRAM 376 MB vs pnpm 1.8 GB
Fresh checkout, warm cache
no lockfile yet · every package already in the cache
bun
251ms
npm
7.61s
pnpm
2.38s
yarn
1.83s
7–30× fasterRAM 52 MB vs pnpm 1.1 GB
CI without a cache
lockfile committed · every tarball fetched from the registry
bun
951ms
npm
4.92s
pnpm
11.69s
yarn
17.61s
5–19× fasterRAM 214 MB vs pnpm 2.7 GB
CI with a warm cache
lockfile committed · dependency cache restored · node_modules rebuilt
bun
210ms
npm
4.45s
pnpm
1.92s
yarn
1.76s
8–21× fasterRAM 12 MB vs pnpm 1.4 GB
node_modules there, cache gone
already installed · only the dependency cache was cleared
bun
12ms
npm
384ms
pnpm
399ms
yarn
212ms
18–33× fasterRAM 12 MB vs pnpm 141 MB
Everything already up to date
the reinstall after nothing changed
bun
12ms
npm
337ms
pnpm
400ms
yarn
211ms
18–33× fasterRAM 12 MB vs pnpm 141 MB

Linux x64, EPYC 9R14 · bench/install in oven-sh/bun · each package manager with its own lockfile and node_modules, state prepared per scenario before every run, every package manager at defaults · medians of 3, peak memory is the largest of the 3 runsreproduce the benchmark →

bun install vs npm, pnpm and yarn — install time by scenario (medians of 3, Linux x64)
scenariobunnpmpnpmyarn
First install, ever (no cache · no lockfile · no node_modules)1.41s18.12s13.49s20.51s
Fresh checkout, warm cache (no lockfile yet · every package already in the cache)251ms7.61s2.38s1.83s
CI without a cache (lockfile committed · every tarball fetched from the registry)951ms4.92s11.69s17.61s
CI with a warm cache (lockfile committed · dependency cache restored · node_modules rebuilt)210ms4.45s1.92s1.76s
node_modules there, cache gone (already installed · only the dependency cache was cleared)12ms384ms399ms212ms
Everything already up to date (the reinstall after nothing changed)12ms337ms400ms211ms

How it's fast

Designed for the way you actually install

Works with Node.js or Bun

A standalone tool: use it in any project with a package.json — workspaces, git/http/tarball dependencies, custom registries and all.

A global install cache

Packages download once into a global cache. Future installs check the cache first and copy with the fastest system calls your OS offers — dramatically faster than symlink farms.

Workspaces & catalogs

Reads the workspaces key and installs every package in one pass. Catalogs pin one version of a dependency across the whole monorepo.

A familiar CLI

bun add, bun remove, bun update -i, bun outdated, bun why — everything you expect from npm, pnpm or yarn.

Secure by default

Bun doesn't run arbitrary postinstall scripts. Popular packages are pre-verified; allow-list others with trustedDependencies. bun audit and minimum-release-age are built in.

A lockfile you can read

bun.lock is plain text: reviewable in PRs, mergeable by git, and migrated automatically from package-lock, yarn.lock or pnpm-lock.