Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

pun remove

Remove a package.

Remove a package from composer.json, then update and install. Also runs as pun rm.

Usage

pun remove <packages> [options]
pun remove laravel/sanctum
pun rm 'spatie/*'

Options

Option Description
--no-update Only edit composer.json.
-p, --package=<member> Edit this workspace member.

Remove also takes the pun update options (except --dry-run) and the pun install options.

What happens

  • Removes the package from require or require-dev.
  • Runs pun update, so unused packages leave the lock and vendor/.
  • If the install fails, restores composer.json and composer.lock.

Exit codes

Code Meaning
0 Removed and installed.
2 No composer.json, a failed install, or another package still needs it.

Last updated on

Was this page helpful?