aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/brew.h.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index 51221a23f..55a416c09 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -245,6 +245,22 @@ rescue
[]
end
+def cleanup name
+ require 'formula'
+
+ f = Formula.factory name
+
+ if f.prefix.parent.directory?
+ kids = f.prefix.parent.children
+ kids.each do |keg|
+ next if f.prefix == keg
+ print "Uninstalling #{keg}..."
+ FileUtils.rm_rf keg
+ puts
+ end
+ end
+end
+
def clean f
Cleaner.new f