Runtime
Bundler
Package Manager
Test Runner
Guides
Reference
Blog
Install Bun
Package Manager Core Commands

bun remove

Remove dependencies from your project

Basic Usage

terminal
$ bun remove ts-node

CLI Usage

terminal
$ bun remove <package>

General Information

--help
boolean

Print this help menu. Alias: -h

Configuration

--config
string

Specify path to config file (bunfig.toml). Alias: -c

Package.json Interaction

--no-save
boolean

Don't update package.json or save a lockfile

--save
booleandefault: true

Save to package.json (true by default)

--trust
boolean

Add to trustedDependencies in the project's package.json and install the package(s)

Lockfile Behavior

--yarn
boolean

Write a yarn.lock file (yarn v1). Alias: -y

--frozen-lockfile
boolean

Disallow changes to lockfile

--save-text-lockfile
boolean

Save a text-based lockfile

--lockfile-only
boolean

Generate a lockfile without installing dependencies

Dependency Filtering

--production
boolean

Don't install devDependencies. Alias: -p

--omit
string

Exclude dev, optional, or peer dependencies from install

Network & Registry

--ca
string

Provide a Certificate Authority signing certificate

--cafile
string

Same as --ca, but as a file path to the certificate

--registry
string

Use a specific registry by default, overriding .npmrc, bunfig.toml and environment variables

Execution Control & Validation

--dry-run
boolean

Don't install anything

--force
boolean

Always request the latest versions from the registry & reinstall all dependencies. Alias: -f

--no-verify
boolean

Skip verifying integrity of newly downloaded packages

Output & Logging

--silent
boolean

Don't log anything

--verbose
boolean

Excessively verbose logging

--no-progress
boolean

Disable the progress bar

--no-summary
boolean

Don't print a summary

Caching

--cache-dir
string

Store & load cached data from a specific directory path

--no-cache
boolean

Ignore manifest cache entirely

Script Execution

--ignore-scripts
boolean

Skip lifecycle scripts in the project's package.json (dependency scripts are never run)

--concurrent-scripts
numberdefault: 5

Maximum number of concurrent jobs for lifecycle scripts (default 5)

Scope & Path

--global
boolean

Install globally. Alias: -g

--cwd
string

Set a specific cwd

Advanced & Performance

--backend
stringdefault: clonefile

Platform-specific optimizations for installing dependencies. Possible values: clonefile (default), hardlink, symlink, copyfile

--network-concurrency
numberdefault: 48

Maximum number of concurrent network requests (default 48)