`brew cleanup` doesn't scrub the Caskroom
Solution 1:
As far as I can tell, it used to be possible to change HOMEBREW_CLEANUP_MAX_AGE_DAYS
to, say, 0, and *.pkg
and similar would be remove with cleanup -s
.
For some reason, that was considered a bug in https://github.com/Homebrew/brew/issues/7320 and changed in https://github.com/Homebrew/brew/pull/7400/files.
I say "for some reason" because it's really mysterious to me, and various people have asked about it and never gotten an answer in the Github issues.
As per that story of the fence and it's removable, you might not want to do something the maintainers consider so unthinkable that they literally can't understand what's being asked.
For everyone else,
ls -la /opt/homebrew/Caskroom/**.{dmg,pkg}
followed by the same lime, only rm -rf
instead of ls -la
seems to work.