

If your Xcode installation has been incorrectly set, you can reset it to the default using the following command: sudo xcode-select -r Applications/Xcode.app/Contents/Developer You can run xcode-select -p to print out the installation location of Xcode: xcode-select -p Simply click the version you want to open or manage. You can install it via Homebrew using the following command: brew install -cask xcodes There is an excellent tool called Xcodes. How to install multiple versions of Xcode

Unfortunately Apple doesn’t allow older, unmaintained versions of Xcode to persist and this is a common annoyance as major versions are released. Simply update Xcode to the latest version using the xcode-select -install command and it will be resolved. When running a homebrew brew command, you may see errors related to the version of Xcode you have installed. Please update to Xcode 14.1 (or delete it). How to update your Xcode installation when using Homebrew Error: Your Xcode (13.4.1) is too outdated. You can install Xcode on a Mac by running the following command in the terminal: xcode-select -install
