My recent upgrade to Yosemite (from Mavericks) took about 6 hours, nearly all of which time was used in processing the contents of /usr/local
(e.g. TeX, etc.).
What is the upgrade process doing with these files that takes so long? Could I accelerate future updates by simply backing up these files, clearing the directory, and copying them manually after the update, or is the update process doing something critical with them?
Best Answer
The problem is only accute if you have a lot of files in
/usr/local
-- a few hundred files is not a problem. It needs to be many thousands of files. The reason, according to this post, is:He goes on to recommend removing anything from your Homebrew installs that isn't currently necessary with the
brew remove; brew cleanup
command pair. You can also move it aside, temporarily, naming it something like/usr/local.mine
and then move it back after the update -- though this can make working with your Mac slightly problematic if you've, for example, switched your default shell for your account to be the Homebrew-suppliedzsh
or something like that.Personally I opted to clean up my Homebrew installs. I also removed any Homebrew-installed daemons (MySQL, PostgreSQL and Redis) completely and shut them down. They're easy enough to get back after the installation is complete. In the end I had only a handful of Homebrew packages installed still that were very essential to me and the installation time wasn't too bad -- about 2 hours on an old iMac.
Of course, you can also wipe everything and just start again. First save everything you have installed:
And now remove them all with:
And to re-install things after you've updated: