Support the ongoing development of Laravel.io →
Installation Configuration

Hi, I just read the usage documentation at getcomposer.org but I didn't find any information on how to uninstall/remove the vendor packages that were previously installed.

Let's assume that I have two vendor packages X and Y installed in my Laravel project.

I wish to completely remove the package X from my project because I'm not using it anymore.

If I remove the dependency X from the composer.json file then execute composer update, does that automatically delete all files related to package X from the vendor directory? or do I have to manually delete them after removing it from the composer.json?

For package Y, I want to keep using it in my project but I don't want it to get auto-updated during the composer update command. I know this can be accomplished by specifying specific version so that it won't update even if there's a new version available but is there alternate way to accomplish this?

Thanks!

Last updated 2 years ago.
0

I think there's no way to uninstall a package. Remove the dependency, update and then remove manually the vendor/package folder. No, put your needed version or update other packages one at a time. Maybe you could fork the repo and then let composer point to your static one instead of the original...

Last updated 2 years ago.
0

@spescina, thanks for the reply!

Regarding the package Y question, wouldn't I achieve what I want by simply removing the dependency from the composer.json but without deleting manually from vendor/package folder?

I do agree that fork might be the best option but I don't until deal with Git and forking as I don' know enough about it.

Last updated 2 years ago.
0

spescina said:

I think there's no way to uninstall a package. Remove the dependency, update and then remove manually the vendor/package folder. No, put your needed version or update other packages one at a time. Maybe you could fork the repo and then let composer point to your static one instead of the original...

hmm.. when I removed the dependency from composer.json then ran update command and it deleted the related vendor/package folders and files... :(

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

avidh avidh Joined 12 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.