How do I undo bundle package
?
I deleted everything in vendor/cache
but it is reinstalled there when I run bundle install
.
That way when you want to perform a full cleanup you can simply remove the gemset, which in turn removes all the gems installed in it. Your other option is to simply uninstall your unused gems and re-run your bundle install command.
Description. This command will remove all unused gems in your bundler directory. This is useful when you have made many changes to your gem dependencies.
You can run just bundle or bundle install to install gems based on your Gemfile. That will remove the instance of mygem from your Gemfile. lock file.
As per this answer: https://stackoverflow.com/a/9471980/219883
You must delete the hidden .bundle
directory, then re-run bundle install
- otherwise it will continue to add the vendor/cache
directory back every time.
But if you just to remove a particular gem, then remove/comment the name of the gem from your project/Gemfile and then run bundle.
To prevent gem files from being added to the vendor/cache directory delete the vendor/cache directory from your project root.
The next time you will run bundle install gems won't create a vendor/cache folder.
Later on in your project if you need the vendor/cache folder all you'll have to do is to create the folder vendor/cache again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With