brew-cleanup
Remove stale lock files and outdated downloads for all formulas and casks. tldr-pages
On several platforms
Several platforms
Remove stale lock files and outdated downloads for all formulas/casks
brew cleanupIdentifyRemove stale lock files and outdated downloads for a specific formula/cask
brew cleanup formulaIdentifySimulate the cleanup, showing what would be removed
brew cleanup --dry-runIdentifyDisplay help
brew cleanup --helpIdentify