We have a bunch of Mac at work that no longer require Xcode or command line tools so we'd like to remove them so the compilers aren't hanging around and we don't have to keep updating them when updates arrive.
Before Xcode was in the Mac App Store, there ware install and uninstall scripts (perl in /Developer) to remove the tools, but now that Xcode is an app store app you are left with the tools if you ever install them.
Can we clean this other than wiping the OS for macs running 10.10 and newer?
/System/Library/Receipts
: https://apple.stackexchange.com/questions/328034/removing-uninstalled-command-line-tools-from-appstore-updates/328089#328089 Perhaps that'll help you as well. – Kenny Lövrin Jun 18 '18 at 09:15/Library/Apple/System/Library/Receipts
... – Rob Dec 16 '20 at 22:57rm -rf $(xcode-select --print-path)
. However, if you usegit
you need the cmd tools. Otherwise,git
cannot be installed. – Timo May 13 '22 at 09:15