diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 0561510cb9..ff9cd96ccb 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -57,6 +57,10 @@ module Homebrew def cleanup_cache return unless HOMEBREW_CACHE.directory? HOMEBREW_CACHE.children.each do |path| + if path.to_s.end_with? ".incomplete" + cleanup_path(path) { path.unlink } + next + end if prune?(path) if path.file? cleanup_path(path) { path.unlink }