FWIW Homebrew’s cleanup command seems pretty effective.

/