Skip to content

Instantly share code, notes, and snippets.

@Justintime50
Last active February 14, 2024 17:17
Show Gist options
  • Star 22 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save Justintime50/2349ff5e62555aa097acbf519bbc27af to your computer and use it in GitHub Desktop.
Save Justintime50/2349ff5e62555aa097acbf519bbc27af to your computer and use it in GitHub Desktop.
Reset Your Xcode Installation on macOS

Reset your Xcode Install on macOS

Having troubles with Xcode or their Command Line Tools? Follow this guide to reset your Xcode instance on macOS and resolve issues such as "No Xcode or CLT version detected!"

1) Check if Xcode is installed

xcode-select -print-path

# If the output of the above command is not similar to the following line, Xcode is not installed. Skip to Step 3.
# /Library/Developer/CommandLineTools

2) Remove Bad Xcode Installation

# Remove Developer folder
sudo rm -rf $(xcode-select -print-path)

# Remove CommandLineTools folder
sudo rm -rf /Library/Developer/CommandLineTools

3) Install Xcode

sudo xcode-select --install

Messing with Xcode's Path

If the above didn't resolve your issue, you may have a problem with the path Xcode is installed at. Use the following to help if necessary.

# Switch Xcode's path
sudo xcode-select -switch /Library/Developer/CommandLineTools

# Reset Xcode's path
sudo xcode-select --reset
@CarolinaPerezFlores
Copy link

EXCELLENT!

@lysandroc
Copy link

awesome!

@euivanw
Copy link

euivanw commented Nov 7, 2021

Thanks!! <3

@haneenmahd
Copy link

really helpful 🫶🏻

@TH1622EE
Copy link

Thank you!

@cederom
Copy link

cederom commented Apr 16, 2023

TANKS :-)

@JulianPGVeevart
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment