BUNDLE-CLEAN(1)
π NAME π
okay bestie, meet bundle-clean β she cleans up all the unused gems in your bundler directory. yep. that's the whole gig. she's the friend who comes over and quietly throws out the expired stuff in your fridge while you're not looking. iconic behaviour, honestly.
β¨ SYNOPSIS β¨
bundle clean [--dry-run] [--force]
π DESCRIPTION π
so here's the vibe: this command removes all unused gems in your bundler directory. literally just yeets them. gone. no crumbs. π
when is this useful? when you've been making many changes to your gem dependencies and your directory is looking like my camera roll β full of stuff you haven't touched in months. you've been adding gems, removing gems, swapping gems out like outfits before a party, and now there's a whole pile of leftovers just sitting there. bundle clean is the glow-up. π¦β¨
π₯ OPTIONS π₯
--dry-runβ print the changes, but do not clean the unused gems. it's the "show me the fit before i commit to buying it" option. you get to see exactly what she would delete, and then she deletes absolutely nothing. zero risk, full tea. π--forceβ forces cleaning up unused gems even if Bundler is configured to use globally installed gems. as a consequence, removes all system gems except for the ones in the current application. π
β οΈ okay so pay attention to this one, fr fr. --force is not playing. it reaches past your app and it removes all system gems except for the ones in the current application. that is a LOT. if you live in a shared environment or you rely on globally installed gems somewhere else, this will ruin your whole week. use it with your eyes open, bestie. π
that's the whole page, no filler, we ate. π
this was bundle-clean(1) from the General Commands Manual, dated April 2026. mwah, take care of your gems, don't --force unless you mean it, and i'll see you in the next one. π«Άπ
π¦ where this page comes from
- centos-stream 9: rubygem-bundler 4.0.16-35.module_el9+1443+8853c6a2 Β· MIT AND (Ruby OR BSD-2-Clause)
- fedora 44: rubygem-bundler 4.0.20-39.fc44
- fedora 44: rubygem-bundler 4.0.20-40.fc44 Β· MIT AND (Ruby OR BSD-2-Clause)
- ubuntu stonking: ruby-bundler 4.0.18-1 Β· MIT OR Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms