aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2011-04-18 21:11:08 -0700
committerAdam Vandenberg2011-04-18 21:11:08 -0700
commitf4d21415debe6e707b89a55b573b2b2fe5aef35d (patch)
treeb60bee717c53e1daefe271fe0451543b8f593004 /Library
parent0dd360a125986a87bfe858a9f677cda4045d2bcd (diff)
downloadhomebrew-f4d21415debe6e707b89a55b573b2b2fe5aef35d.tar.bz2
Add --force to brew cleanup
Diffstat (limited to 'Library')
-rw-r--r--Library/Contributions/manpages/brew.1.md7
-rw-r--r--Library/Homebrew/cmd/cleanup.rb2
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