Search code examples
githubcommand-line-interfacehomebrew

Sorting Installed BREW Packages by Install Size


I know I can brew ls to get a summary of everything I have installed using Homebrew. I was recently cleaning up some unused packages and was a bit surprised that mysql was taking up 1.7Gb.

Is there some way I can sort the list, or at least get more information, for install size on all of my packages directly in the Terminal?


Solution

  • I would do which brew, get to that dir eg (/usr/local/Cellar) then do

    brew install coreutils

    du -hs * | gsort -h it will show sizes of directories