diff options
| author | Adam Vandenberg | 2011-04-18 21:11:08 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2011-04-18 21:11:08 -0700 |
| commit | f4d21415debe6e707b89a55b573b2b2fe5aef35d (patch) | |
| tree | b60bee717c53e1daefe271fe0451543b8f593004 /Library | |
| parent | 0dd360a125986a87bfe858a9f677cda4045d2bcd (diff) | |
| download | homebrew-f4d21415debe6e707b89a55b573b2b2fe5aef35d.tar.bz2 | |
Add --force to brew cleanup
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Contributions/manpages/brew.1.md | 7 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/cleanup.rb | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Library/Contributions/manpages/brew.1.md b/Library/Contributions/manpages/brew.1.md index 3030f3b8d..8c5b018ca 100644 --- a/Library/Contributions/manpages/brew.1.md +++ b/Library/Contributions/manpages/brew.1.md @@ -146,9 +146,12 @@ didn't include with OS X. * `cat` <formula>: Display the source to <formula>. - * `cleanup` [<formula>]: + * `cleanup [--force]` [<formula>]: For all installed or specific formulae, remove any older versions from the - cellar. + cellar. By default, does not remove out-of-date keg-only brews, as other + software may link directly to specific versions. + + If `--force` is passed, remove out-of-date keg-only brews as well. * `log [git-log-options]` <formula> ...: Show the git log for the given formulae. Options that `git-log`(1) diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index c01f4b18f..6254983b9 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -28,7 +28,7 @@ module Homebrew extend self # Don't clean up keg-only brews for now. # Formulae link directly to them, so cleaning up old # ones will break already compiled software. - if f.keg_only? + if f.keg_only? and not ARGV.force? opoo "Skipping keg-only #{f.name}" if rack.children.length > 1 return end |
