Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 735
oliver Avatar asked Dec 01 '16 20:12

oliver


1 Answers

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

like image 151
flakerimi Avatar answered Sep 28 '22 05:09

flakerimi