Skip to content

Instantly share code, notes, and snippets.

@blobaugh
Created January 22, 2025 23:06
Show Gist options
  • Save blobaugh/de230a1cd6100fc3f12245420770c72b to your computer and use it in GitHub Desktop.
Save blobaugh/de230a1cd6100fc3f12245420770c72b to your computer and use it in GitHub Desktop.
Unattended updates for the modern Mac user.
#!/bin/bash
###
# Unattended updates for the modern Mac user.
#
# It is recommended to enable App Management for your terminal application.
#
# Go to System Settings > Privacy & Security > App Management and add or enable your terminal.
###
# Update packages managed by brew
brew update && brew upgrade
# Install all available updates App Store, including macOS system updates
# NOTE: A system restart may be required here. Run this script again after restarting.
sudo softwareupdate --install --all --agree-to-license
# Reboot to apply any further updates
sudo shutdown -r +1
@gregrickaby
Copy link

gregrickaby commented Jan 24, 2025

I use ZSH and have this alias in my .zshconfig:

alias brewupdate="cd ~ && brew update && brew upgrade && brew cleanup && nvm install 'lts/\*' --reinstall-packages-from=current && npm update -g && omz update"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment