Xcode.app not found on Mac

Aung Baw
1 min readFeb 9, 2023

I kept my old mac to satisfy basic web development tools with homebrew, as a usual setup I need to install Xcode app from AppStore or cli version of it. Xcode use ton of HDD space & update alone took nearly 10GB of request. I removed it from GUI, clear the app cache via Mac disk utility. I Then I hit following error


xcrun: error: active developer path (“/Applications/Xcode.app/Contents/Developer”) does not exist
Use `sudo xcode-select — switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select — install` to install the standalone command line developer tools.
See `man xcode-select` for more details.

I tried to figure out Xcode path because the error message said already installed some version of it. I figure out the path

xcode-select -print-path
/Applications/Xcode.app/Contents/Developer

I could do two way either reset the path of set manually. Feel free to try one of these.


sudo xcode-select — switch /Library/Developer/CommandLineTools/
sudo xcode-select - reset

But if you don’t have a cli version of Xcode, you could do like this, brew definitely need this.

xcode-select — install

In worst case, just remove it manually and reinstall it.

sudo rm -rf /Library/Developer/CommandLineTools

Hope it helps.

--

--

Aung Baw

Focusing on security, cloud, and DevOps, I am a lifelong learner and lazy 徒弟.