Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Russelmhardy's avatar

delete packages not used in laravel

when i finished in my project laravel i want to delete all packages not used in it, is can possibilité to delete them with boot ?

0 likes
4 replies
Sinnbeck's avatar

What do you mean by "boot"?

Remove them from composer.json and run composer update

1 like
geowrgetudor's avatar

There's no command to remove composer packages using artisan. You either do what @sinnbeck said or you do composer remove <package_name>.

Or, if you are referring to production optimization, then you should always run composer install --no-dev because you shouldn't install dev dependencies in production. Also make sure you do php artisan optimize to cache your config/routes/files.

Please or to participate in this conversation.