2025-12-16 10:20:31 -07:00
|
|
|
# bun remove
|
|
|
|
|
|
|
|
|
|
> Remove a dependency from `package.json`.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://bun.com/docs/pm/cli/remove>.
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Remove a dependency:
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
`bun {{[rm|remove]}} {{package_name}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Remove multiple dependencies:
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
`bun {{[rm|remove]}} {{package_name1 package_name2 ...}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Remove a globally installed package:
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
`bun {{[rm|remove]}} {{[-g|--global]}} {{package_name}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Remove a dependency without updating the `package.json` file:
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
`bun {{[rm|remove]}} --no-save {{package_name}}`
|
2025-12-16 10:20:31 -07:00
|
|
|
|
|
|
|
|
- Run the command without actually removing packages (simulate the removal):
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
`bun {{[rm|remove]}} --dry-run {{package_name}}`
|