Update all the things
I use this little script to keep my mac tools updated and clean. It works if you have Homebrew and ruby installed as standard user (I use rvm).
brew update
brew upgrade
brew cleanup
gem update
gem cleanup
I know they’re just 5 commands, but I love to be up to date my two computers (an iMac and a MacBook), so it’s a convenient way to just merge them. I also decided to avoid using cron to run the script every day because I need to do it deliberately as the upgrade process can even break my workflow. It also includes the cleanup phase to free disk space removing outdated stuff.
You can find the raw version here.
I saved the file in the /usr/local/bin/ folder named update and made it executable chmod +x /usr/local/bin/update so it can be run from everywhere.
If you feel really adventurous (the remote file can be changed at any time - use at your own risk) you can even execute it remotely.
curl -s https://macteo.it/g/update.sh | bash
