I'm currently on OSX Mountain Lion, but I'm probably going to upgrade my OS pretty soon, either to Mavericks or Yosemite. I'm looking to download command line tools for homebrew; however, looking through the various versions, I'm probably going to have to upgrade command line tools for new versions that are released, and especially if I decide to upgrade my OS.
I've looked at other discussions on StackOverflow that discuss updating, and the threads that I've looked at seem to suggest that uninstalling the old version and then installing the new version is the way to go. However, it seems that the main way to uninstall old versions of command line tools, as mentioned by this thread (How to uninstall Xcode 4.4 command line tools (Mac OS X 10.8 Mountain Lion)?) is using an unofficial and kind of hack-ish looking script.
Given that new versions are released fairly often and updating is required for an OS upgrade, making upgrading a pretty regular task, it would seem that there would be an easier/smoother way to upgrade. Is there such a way to upgrade? For example, would simply installing another version of command line tools over the previous version be sufficient, cleanly overwriting the previous version? Or is there a way to upgrade through command line?
Any help would be greatly appreciated. Thanks in advance!