pun remove
Remove packages from composer.json, then update and install.
pun remove laravel/sanctum
pun rm 'spatie/*'
pun remove deletes packages from require or require-dev, then runs pun update. Packages nothing else needs leave the lock and vendor/. pun rm is an alias.
Pun edits composer.json only after the requirements resolve. If the install fails, Pun restores composer.json and composer.lock.
Options
| Option | Effect |
|---|---|
--no-update |
Edit composer.json only |
-p, --package=MEMBER |
Edit this workspace member’s composer.json |
pun remove also takes the pun update options except --dry-run, and every pun install option.
Exit codes
| Code | When |
|---|---|
| 0 | Removed and installed |
| 2 | No composer.json, unresolvable requirements, a failed repository, or a failed install |