bun-remove
Remove Bun project packages
TLDR
Remove a dependency
Remove multiple dependencies
Remove a globally installed package
Remove a dependency without updating the package.json file
Run the command without actually removing packages (simulate the removal)
SYNOPSIS
bun remove [options] <packages...>
bun uninstall [options] <packages...>
PARAMETERS
<packages...>
One or more package names to remove. Multiple packages should be separated by spaces.
-D, --dev
Remove the specified package(s) from devDependencies, which are only needed during development.
-O, --optional
Remove the specified package(s) from optionalDependencies, which might not be available or needed on all platforms.
-P, --peer
Remove the specified package(s) from peerDependencies, which are dependencies that the host project should provide.
-g, --global
Remove the specified package(s) from global installation. Global packages are typically installed in a system-wide location accessible from any project.
--dry-run
Show what would be removed without actually performing the removal operation. Useful for testing changes safely.
--silent
Suppress all output messages from the command, showing only errors.
--help
Display help information for the bun remove command, including all available options and usage examples.
DESCRIPTION
The command name "bun-remove" is not a standard or recognized Linux command or standalone executable. It is highly probable that it refers to the functionality provided by the Bun JavaScript runtime's package manager to remove installed project dependencies. Specifically, users typically invoke this action using the subcommands bun remove or bun uninstall. These commands are used within a Bun project directory to remove specified packages from the project's dependencies, update the package.json file (by removing the entry from dependencies, devDependencies, etc.), and clean up the bun.lockb lockfile. The primary purpose is to manage project dependencies by eliminating unneeded libraries, thereby reducing project size and improving build performance.
CAVEATS
The term "bun-remove" itself is not a valid Linux command or a standalone executable. Users must ensure they have the Bun runtime installed on their system to use the bun remove or bun uninstall subcommands. These commands only operate within the context of a Bun-managed project and affect its dependencies defined in package.json. Removing crucial dependencies can lead to application malfunctions or failures during development or production, so caution is advised.
COMMON USAGE EXAMPLES
To remove a single package from your project's dependencies: bun remove lodash
To remove multiple packages simultaneously: bun uninstall express react
To remove a development dependency: bun remove -D eslint
To remove a globally installed package: bun uninstall -g typescript
REMOVE VS. UNINSTALL
Within the Bun package manager, bun remove and bun uninstall are aliases for the exact same functionality. Both commands achieve the identical outcome: removing specified packages from your project's dependencies and updating the relevant project files.
HISTORY
Bun was created by Jarred Sumner and first publicly released in July 2022, rapidly gaining traction as a fast, all-in-one JavaScript runtime, bundler, and package manager. The bun remove (and bun uninstall) command is an integral part of its package management suite. It was designed to offer a faster and more efficient alternative to existing Node.js package managers like npm and Yarn for removing project dependencies. Its development has focused on performance, compatibility with existing Node.js ecosystems, and providing a unified development experience.


