DEV Community

What tips do you have for homebrew users?

Derek Hopper on October 31, 2018

This morning, I recovered 110 GB of disk space thanks to one command. I'm a heavy homebrew user. I install packages all the time. On top of that, ...
Collapse
 
clpsplug profile image
C. Plug

There's an argument switch to have homebrew do clean-up every time it upgrades!

brew upgrade --cleanup
==> Upgrading tbb
==> Downloading https://homebrew.bintray.com/bottles/tbb-2019_U2.mojave.bottle.t
######################################################################## 100.0%
==> Pouring tbb-2019_U2.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/tbb/2019_U2: 134 files, 2.7MB
Removing: /usr/local/Cellar/tbb/2019_U1... (134 files, 2.7MB)
Removing: /Users/me XD/Library/Caches/Homebrew/tbb--2019_U1.mojave.bottle.tar.gz... (660.2KB)
Collapse
 
rhymes profile image
rhymes

Ah ah the magic cleanup!

I created an alias so I won't forget:

> alias brew-upgrade
brew-upgrade='brew update && brew upgrade && brew cask upgrade && brew cleanup'
Collapse
 
aikedejongste profile image
Aike de Jongste

==> This operation has freed approximately 417.6MB of disk space.

My tip would be to use a Brewfile: robots.thoughtbot.com/brewfile-a-g...