Monday, 29 June 2026

Xcode Command Line Tools

Xcode command line tools standalone package removal

To remove the Xcode Command Line Tools standalone package, including the update prompts which occur when Apple releases new versions of the xcode command line tools, do the following:

  1. In a terminal, execute
    sudo rm -rf /Library/Developer/CommandLineTools
  2. Shut down
  3. Restart in Recovery Mode
  4. Disable SIP. In a terminal (⌘T, or from the Utilities menu), execute
    csrutil disable

    Note you will be asked for an admin user and password

  5. Restart normally and login
  6. In a terminal, execute
    sudo rm /Library/Apple/System/Library/Receipts/com.apple.pkg.CLTools_*
  7. Shut down
  8. Restart in Recovery Mode
  9. Enable SIP. In a terminal (⌘T, or from the Utilities menu), execute
    csrutil enable

    Note you will be asked for an admin user and password

  10. Restart normally and login

Xcode command line tools information

If you have xcode installed and you need access to the command line tools, you can either use the xcode preferences to set the path to the appropriate version of xcode which contains the command line tools you want to use, or you can use xcode-select to select the appropriate version of xcode which contains the command line tools you want to use.

sudo xcode-select --switch /Applications/Xcode-26_5/Xcode.app

To find out which version / the path of the xcode command line tools are in use, use

sudo xcode-select -p