Before you start

Homebrew cleanup removes stale downloads and old versions according to its cleanup rules. Preview first and read the output before taking action.

Steps

The preview does not delete files. Run cleanup only after confirming you no longer need the items it identifies; avoid treating cleanup as a backup strategy.

brew cleanup --dry-run
brew cleanup

Using Casklane

Casklane shows your Homebrew library and package details in a native Mac interface. Review the package and operation output before confirming a change. Homebrew itself still performs package operations.

Sources and further reading