Skip to content

vp remove ​

Remove dependencies from the project. Aliases: vp rm, vp un, and vp uninstall.

bash
vp remove react
vp remove --filter web react
vp remove -g --dry-run typescript

Options ​

OptionDescriptionNotes
-D, --save-devRemove from devDependencies.
-O, --save-optionalRemove from optionalDependencies.
-P, --save-prodRemove from dependencies.
--filter <pattern>Select workspaces by pattern.Can be repeated.
-w, --workspace-rootRemove from workspace root.
-r, --recursiveRemove recursively from all workspace packages.
-g, --globalRemove global packages.Requires the global CLI. Uses the global package store.
--dry-runPreview what would be removed without actually removing.Requires --global.

Compatibility ​

The commands below describe project operations. Global mode is described under Options.

  • npm: npm uninstall.
  • pnpm: pnpm remove.
  • Yarn Classic: yarn remove.
  • Yarn Modern: yarn remove.
  • Bun: bun remove.
OptionnpmpnpmYarn ClassicYarn ModernBunNotes
-D, --save-devYesYesNoNoNo
-O, --save-optionalYesYesNoNoNo
-P, --save-prodYesYesNoNoNo
--filter <pattern>YesYesOne filterYes1.4 or later
-w, --workspace-rootYesYesNoNoNo
-r, --recursiveYesYesNoYesNonpm includes the workspace root.
-g, --globalYesYesYesYesYes
--dry-runYesYesYesYesYes

Native Options ​

For native options, see npm uninstall, pnpm remove, Yarn remove, Yarn Classic remove, and Bun remove. To pass these options through Vite+, see Native Arguments.