Managing Dependencies in Bun

From the Bun cheat sheet ยท Package Manager ยท verified Jul 2026

Managing Dependencies

Install, add, remove, and update packages

bash
# Install all dependencies
bun install

# Add a package
bun add express

# Dev dependency
bun add -d typescript

# Remove a package
bun remove express
๐Ÿ’ก bun install is up to 30x faster than npm โ€” uses a global cache and hardlinks
โšก Since Bun 1.2 the default lockfile is the text-based bun.lock โ€” readable in diffs and Git-friendly
๐Ÿ“Œ Use --frozen-lockfile in CI to ensure deterministic installs
๐ŸŸข Workspaces work like npm/yarn workspaces โ€” just add "workspaces" to package.json
installaddremovepackages
Back to the full Bun cheat sheet