diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 1014f3de61..c8b158dd1e 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -39,9 +39,10 @@ module Homebrew else eligible_kegs.each { |keg| opoo "Skipping (old) keg-only: #{keg}" } end - elsif f.installed_prefixes.any? + elsif f.installed_prefixes.any? && !f.pinned? # If the cellar only has one version installed, don't complain - # that we can't tell which one to keep. + # that we can't tell which one to keep. Don't complain at all if the + # only installed version is a pinned formula. opoo "Skipping #{f.full_name}: most recent version #{f.pkg_version} not installed" end end