brew cleanup
all
Remove stale lock files and outdated downloads for all formulas and casks.
More info →Options (2)
-n, --dry-runbooleanShow what would be removed, but do not actually remove anything
Example:
brew cleanup {{[-n|--dry-run]}}-h, --helpbooleanDisplay help
Example:
brew cleanup {{[-h|--help]}}Examples (4)
Remove stale lock files and outdated downloads for all formulas/casks
Remove stale lock files and outdated downloads for a specific formula/cask
brew cleanup formula|caskShow what would be removed, but do not actually remove anything
brew cleanup [-n|--dry-run]Display help
brew cleanup [-h|--help]made by @shridhargupta | data from tldr-pages