Skip to content
Bun
Bun
Core Commands

bun remove

Remove dependencies from your project

Basic Usage

terminal
bun remove ts-node

CLI Usage

terminal
bun remove <package>

General Information

--helpboolean

Print this help menu. Alias: -h

Configuration

--configstring

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

Package.json Interaction

--no-saveboolean

Don’t update package.json or save a lockfile

--savebooleandefault: true

Save to package.json (true by default)

--trustboolean

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

Lockfile Behavior

--yarnboolean

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

--frozen-lockfileboolean

Disallow changes to lockfile

--save-text-lockfileboolean

Save a text-based lockfile

--lockfile-onlyboolean

Generate a lockfile without installing dependencies

Dependency Filtering

--productionboolean

Don’t install devDependencies. Alias: -p

--omitstring

Exclude dev, optional, or peer dependencies from install

Network & Registry

--castring

Provide a Certificate Authority signing certificate

--cafilestring

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

--registrystring

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

Execution Control & Validation

--dry-runboolean

Don’t install anything

--forceboolean

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

--no-verifyboolean

Skip verifying integrity of newly downloaded packages

Output & Logging

--silentboolean

Don’t log anything

--verboseboolean

Excessively verbose logging

--no-progressboolean

Disable the progress bar

--no-summaryboolean

Don’t print a summary

Caching

--cache-dirstring

Store & load cached data from a specific directory path

--no-cacheboolean

Ignore manifest cache entirely

Script Execution

--ignore-scriptsboolean

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

--concurrent-scriptsnumber

Maximum number of concurrent jobs for lifecycle scripts (default: 2x CPU cores)

Scope & Path

--globalboolean

Install globally. Alias: -g

--cwdstring

Set a specific cwd

Advanced & Performance

--backendstringdefault: clonefile

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

--network-concurrencynumberdefault: 48

Maximum number of concurrent network requests (default 48)