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
requireorrequire-dev. - Runs
pun update, so unused packages leave the lock andvendor/. - If the install fails, restores
composer.jsonandcomposer.lock.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Removed and installed. |
| 2 | No composer.json, a failed install, or another package still needs it. |