Skip to content

Instantly share code, notes, and snippets.

@BretFisher
Created February 8, 2016 18:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BretFisher/d6a0ca690d6e034954ea to your computer and use it in GitHub Desktop.
Save BretFisher/d6a0ca690d6e034954ea to your computer and use it in GitHub Desktop.
Mac Update/Cleanup Script
#!/bin/sh
# store the current dir
CUR_DIR=$(pwd)
# Update App Store apps
sudo softwareupdate -i -a
# Update Homebrew (Cask) & packages
brew update
brew outdated
read -p "ok to upgrade? [enter]"
brew upgrade
brew cleanup -s
# Update npm & packages
npm install npm -g
npm update -g
# Update Ruby & gems, non-sudo updates rbenv versions, sudo updates mac and sudo versions
gem update --system
gem update
gem cleanup
sudo gem update --system
sudo gem update
sudo gem cleanup
# take them back
cd $CUR_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment