How do I uninstall old SDKs?

I recently upgraded to Apple OS X 10.8 but I observed the following folders in /Developer/SDKs:

  • MacOSX10.5.sdk
  • MacOSX10.6.sdk

I googled and found out that I should run sudo /Developer/Library/uninstall-devtools --mode=all.

However I forgot the --mode=all and now I still have the SDK folders but the uninstall-devtools script has gone. I have also installed Xcode 4.5.2 but it seems that it does not come with the command line tool called uninstall-devtools.

How can I get rid of the old SDKs?


Solution 1:

The installer for Xcode 4.3 had an option for removing older versions of Xcode which removed /Developer/.

You can probably just delete the folder completely. It was possible to delete single developer folders even before Xcode 4.3. From an answer by Chris Espinosa on Stack Overflow:

If you have multiple Developer folders, you can drag any of them to the trash without damaging the others. Developer folders are completely standalone.