Method 1: Automatically Using Composer Command
If you are using composer to install your package, you will need to run the "composer require" command and passing the package name to install.
composer remove <package>
composer require spatie/laravel-sitemap
composer remove spatie/laravel-permission
Method 2: Manually Remove
If you want to manually remove the package then you can open the "composer.json" and manually deleting the package from the dependency list.
- Open composer.json and remove dependency
- Delete the package folder from the "vendor" folder.
- Run "composer update" from the terminal to update composer.lock
Optional Command To Run
You may also run "composer dump-autoload" once you have done the remove command and this will autoload all of the package dependencies.
Leave a reply