Rebuilding your Mac with Homebrew and Cask | Stephen Cross

Rebuilding your Mac with Homebrew and Cask

Submitted by Stephen Cross on Sat, 12/31/2016 - 15:55

Rebuilding your Mac with Homebrew and Cask

On a recent episode of Talking Drupal, my Drupal podcast, co-host John Picozzi (@johnpicozzi) mentioned he is using Homebrew and Cask to setup his new MacBook Pro. Homebrew is a package manager for macOS and Cask extends Homebrew by allowing applications to be installed from the command line. For example, the command below will install Chrome.

brew cask install google-chrome

Could it be that easy? Yes.

I have an early 2011 13” MacBook Pro decked out with 16GB RAM, 1TB SSD and stickers. It had been running very slow for many months and I knew I needed to wipe it clean and start fresh. That’s a time consuming, daunting task. But John’s tip about Homebrew and Cask gave me the courage to get’r done.

A few hours after leaning about Homebrew and Cask, I jumped in. My Mac is backed up locally with Time Machine and externally with Backblaze. If all failed, I could restore from a backup, but I didn’t. I’m up and running with a clean machine, and it feels good.

Why wipe clean and re-install? Since purchasing my MBPro, there have been 9 OS upgrades and almost six years of installing and removing all types of applications. I’m sure there is software “cruft” running that’s not needed. When I purchased this Mac I may have restored from the previous Mac, bring forward much older cruft.

The steps I took (at a high level)

Documentation - I reviewed my Applications folder and wrote down all the apps I need to reinstall. I noted which ones came from App Store, the others could be installed with Homebrew. I marked which ones I needed license keys for and verified I had them documented in Evernote. I also noted the critical apps that I needed available to continue working after the install.

Verified Backups - I verified all my backup were up to date and I created additonal copies of the most critical folders to an external drive. Some of those included:

  • SHH keys
  • MAMP Databases - I ran a script that exported each database a file. 
  • Business Documents
  • Development Code

Wipe and Install - Reboot with Command-R. I erased the drive and re-installed macOS. 30 minutes later I had a fresh install of Siera.

Rebuild - This is where Homebrew and Cask came in very handy and saved lots of time. I installed from the instructions online. If you are not a command line person, thats okay, this is simple stuff. Open the Terminal app and follow the instruction. My first few installed looked like this:

brew cask install dropbox

brew cask install lastpass

brew cask install evernote

brew cask install google-chrome

brew cask install omnifocus

brew cask install adobe-creative-cloud

brew cask install docker

brew cask install docker-toolbox

Conclusion

Within 2 hours I had my Mac running with the most of the apps I use daily. It took more time to restore data from external drives.

Resources

Talking Drupal 135 - Tool Time

Homebrew

Cask