> ## Documentation Index
> Fetch the complete documentation index at: https://bun.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# bun remove

> Remove dependencies from your project

## Basic Usage

> [!NOTE]
>
> **Alias** — `bun rm`, `bun uninstall`, `bun r`

```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun remove ts-node
```

Bun removes the package from every dependency group in `package.json` that lists it and updates `bun.lock`. Once nothing else depends on the package, Bun deletes it from `node_modules`.

## `--filter`

> [!NOTE]
>
> **Alias** — `-F`

In a monorepo, remove the package from the matching workspace(s) instead of the current directory's package, using the same patterns as [`bun add --filter`](https://bun.com/docs/pm/cli/add#--filter). Use `--filter '*'` to remove it from every workspace package. Workspaces that don't list the package are left untouched.

```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
bun remove zod --filter api
bun remove zod --filter '*'
```

***

## CLI Usage

```bash terminal icon="terminal" theme={"theme":{"light":"github-light","dark":"dracula"}}
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** `boolean` (default: true)

Save to `package.json` (true by default)

**--trust** `boolean`

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

**--filter** `string`

Remove the package(s) from the matching workspaces instead of the current package. Alias: `-F`

### 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`

Perform a dry run without making changes

**--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 for all packages, including the project's `package.json` and trusted dependencies

**--concurrent-scripts** `number`

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

### Scope & Path

**--global** `boolean`

Install globally. Alias: `-g`

**--cwd** `string`

Set a specific cwd

### Advanced & Performance

**--backend** `string`

Platform-specific optimizations for installing dependencies. Possible values: `clonefile` (default on
macOS), `hardlink` (default on Linux and Windows), `symlink`, `copyfile`

**--network-concurrency** `number` (default: 48)

Maximum number of concurrent network requests (default 48)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.