Closed MarkMT closed 14 years ago
gem bundle --prune-cache will remove these for you.
Cool - thanks! I guess the issue then is just the fact that that option is not documented - unless I've missed it somehow.
Hey MarkMT, running gem bundle --help
shows the --prune-cache
option and what it does.
Currently, the description is a bit off though, since it suggests that it will remove all .gem files (where it actually just removes .gem files that are not a part of the bundle).
If you're interested, there's an open issue for the documentation fix at http://github.com/wycats/bundler/issues#issue/124
This is a dup of vandrijevik's ticket, which includes a patch
Removing a gem from your gemfile results in the gem being deleted from the bundle. However Repository@cleanup actually only removes the files from the @path.join("specifications") and @path.join("gems") directories. It evidently leaves the gem file in the 'cache' directory.
So the gem is not really deleted, and if you subsequently replace it in the gemfile, it appear that it will always be pulled from the cache, which may not be what you want to happen.