How to Install macOS Updates via Terminal and Command Line: The 2025 Complete Guide

install macOS updates via terminal

Keeping your Mac up to date is essential for security, performance, and accessing the latest features.

While most users rely on the graphical Software Update interface, many power users and IT admins prefer to install macOS updates via terminal for greater control and automation.

This 2025 guide walks you through the process which is perfect for both beginners and experienced Mac users who want to streamline system updates with just a few commands.

Why Use Terminal to Update macOS?

  • Speed and Automation: Automate updates or run them on multiple Macs remotely.

  • Control: Update individual packages or the entire system with precision.

  • Scripting: Integrate updates into setup scripts for new machines or enterprise fleets.

  • Remote Management: Update headless Macs or Macs without easy access to the GUI.

Prerequisites

  • An internet connection.

  • Administrator access to your Mac.

  • Terminal app (found in Applications > Utilities).

Step by Step Guide: How to Install macOS Updates via Terminal

1. Open Terminal

You can launch Terminal from Applications → Utilities or by searching “Terminal” in Spotlight.

2. Check for Available Updates

Type the following command and press Enter:

This will list all available software updates for your system.

📄
filename
softwareupdate -l

This will list all available software updates for your system.

3. Install All Available Updates

To install all available updates, use:

📄
filename
softwareupdate -ia
  • sudo grants administrative privileges.

  • -i stands for install.

  • -a means all updates.

You’ll be prompted to enter your administrator password.

4. Install a Specific Update

If you want to install a particular update (for example, a macOS security update), first list available updates:

📄
filename
softwareupdate -l

Then copy the name of the update you want (for example, “macOS Sonoma 14.5-23F79”), and run:

📄
filename
sudo softwareupdate -i "macOS Sonoma 14.5-23F79"

5. Restart Your Mac (If Needed)

Some updates require a restart. You can do this from the Apple menu, or with:

📄
filename
sudo shutdown -r now

6. Additional Useful Flags

  • –background: Download updates in the background.

  • –ignore <update>: Ignore a specific update.

  • –help: Get more options and help.

Example:

📄
filename
softwareupdate --help

Troubleshooting Common Issues

  • Command Not Found: Ensure you are using macOS 10.14 (Mojave) or later, as older systems may use different update mechanisms.

  • Permission Denied: Prefix commands with sudo and enter your admin password.

  • No Updates Available: Your Mac might already be up to date, or your model may not support the latest macOS version.

Automating Updates with a Script

For power users or IT admins, you can create a simple shell script to automate regular updates:

Start your script with:

📄
filename
softwareupdate -ia
sudo shutdown -r now

Save your script as update_mac.sh, make it executable with chmod +x update_mac.sh, and run it as needed.

Conclusion

Installing macOS updates via terminal is a fast, efficient, and scriptable way to keep your Mac secure and up to date. Whether you’re managing a single machine or hundreds in an enterprise, these commands put you in control of the update process in 2025 and beyond.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.