How to update your Mac (macOS) using Terminal Command

We can update macOS via the terminal using the softwareupdate command. This command allows you to check for, download, and install macOS updates. Here are the steps to update macOS using the terminal.

  1. Open Terminal App.
  2. Run the command to check for list of updates: softwareupdate -l
    % softwareupdate -l
    Software Update found the following new or updated software:
    * Label: Command Line Tools for Xcode-15.3
    	Title: Command Line Tools for Xcode, Version: 15.3, Size: 707501KiB, Recommended: YES, 
    * Label: Command Line Tools beta 2 for Xcode-16.0
    	Title: Command Line Tools beta 2 for Xcode, Version: 16.0, Size: 743581KiB, Recommended: YES

    As you can see the above command checks for available updates and lists them.

  3. Install updates:

    If you want to install all updates at once, use the below command,

    % sudo softwareupdate -i -a

    If you wish to install specific updates, then use the bellow option

    sudo softwareupdate -i "NAME-OF-THE-UPDATE"

    Here the name of the update is the "Title" name you see in the list.

  4. Finally after installing you can reboot your Mac using the below command,
    % sudo shutdown -r now

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap