commands.sh

brew cleanup

all

Remove stale lock files and outdated downloads for all formulas and casks.

More info →

Options (2)

-n, --dry-runboolean

Show what would be removed, but do not actually remove anything

Example: brew cleanup {{[-n|--dry-run]}}
-h, --helpboolean

Display 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|cask

Show 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