diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 36073daf32706e6afd0e64032306e8939a6877f6..6b9ce1d519b33f8521ddbe64cf95bcfb9c37e8e5 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -231,6 +231,16 @@ def check_for_latest_xcode
   end
 end
 
+def check_for_stray_developer_directory
+  if MacOS::Xcode.version >= "4.3" and File.exist? "/Developer/Library"
+    return <<-EOS.undent
+    You have leftover files from an older version of Xcode.
+    You should delete them using:
+      /Developer/Library/uninstall-developer-folder
+    EOS
+  end
+end
+
 def check_cc
   unless MacOS::CLT.installed?
     if MacOS::Xcode.version >= "4.3"