diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index 01805809eed4cb2d5ef1559968d53cccb3be5adf..dd1b4635b69c92908dd6f0fd29c8c902532ac738 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -17,9 +17,21 @@ module Homebrew
 
   def outdated_brews(formulae)
     formulae.map do |f|
-      versions = f.rack.subdirs.map { |d| Keg.new(d).version }.sort!
-        if versions.all? { |version| f.pkg_version > version }
-        yield f, versions if block_given?
+      all_versions = []
+      same_tap_versions = []
+      f.rack.subdirs.each do |dir|
+        keg = Keg.new dir
+        version = keg.version
+        all_versions << version
+
+        tap = Tab.for_keg(keg).tapped_from
+        if f.tap == tap || f.version == version
+          same_tap_versions << version
+        end
+      end
+
+      if same_tap_versions.all? { |version| f.pkg_version > version }
+        yield f, all_versions if block_given?
         f
       end
     end.compact