How to stop updating Command Line Tools

Hi, I have some code that relies on CLT for Xcode 13.4. After MacOS pushed the update to CLT for Xcode 14, my compilation routine broke and it took some time to realise that it was due to this recent update. I managed to downgrade CLT to the previous version, but I had to disable automatic updates to avoid the new version being installed again.

So the question is, is it possible to stop updates to CLT for Xcode 13.4?

Alternatively, is there a way to install two versions of CLT in two separate folders and then use xcode-select -s for the one I need? Thanks! I assume yes (why would we have the option -s then), but I could not find a way to have two different folders though.

  • I managed installing two separate instances of CLT. For some reason, if I do not (1) use the system '/bin/cp' and (2) copy the parent directory '/Library/Developer', compilations will fail. Now submit /bin/cp -R /Library/Developer ~/Library/;sudo xcode-select -s ~/Library/Developer/CommandLineTools and the new instance of CLT should work. At which point I can update the old CLT to version 14.

Add a Comment

Replies

Why does your code rely on CLT version 13.4? Can't you update it so it works with the newer version?

  • Thanks @darkpaw, I use a package manager that was compiled against CLT 13.4 without issues (Gentoo Prefix). If I upgrade to CLT 14, there are some compatibility issues with the new compiler and many packages simply do not compile against CLT 14.

Add a Comment