How to Remove a Package From Laravel Using Composer

We have already discussed how we can install packages and dependencies using Composer dependency manager. In this tutorial, we are going to see how we can remove existing packages from Laravel.

To remove a package navigate to your project folder and use the following command.

composer remove vendor/package


let’s say, I want to remove the HTML and Form builder package from my Laravel app. Then I need to run the following command.

composer remove laravelcollective/html

Where laravelcollective is the vendor name and html is the name of the package. Also, you need to remove references to that package from providers and aliases arrays from within the app.php.

Leave a Comment.