How to update Xcode Command Line Tools?

For future travelers, here’s a version-agnostic approach. First, run softwareupdate --list. This will probably take a couple of minutes. When it’s done, you’ll see a bulleted (with an asterisk) output like this:

$ softwareupdate --list
Software Update Tool

Finding available software
Software Update found the following new or updated software:
   * Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1
        Command Line Tools (macOS High Sierra version 10.13) for Xcode (10.1), 190584K [recommended]

Find the bullet that refers to the Xcode command line tools. Copy that entire line (except the asterisk…). In the above case, you would copy: Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1

Then, run the install command (as shown by Brendan Shanks) with what you copied inside quotes:

softwareupdate -i "Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1"

Leave a Comment