Can I install Xcode on an external HD?

I hope this isn't too off-topic, but I'm in a bind

My HD is so full that I can't download any new iOS' in Xcode. Actually, there's a lot I can't do. According to the storage part of System Details, Developer is over 100 GB.

I have a huge external HD and would like to completely remove and clean Xcode, and the reinstall it on the external HD.

1 - Is this allowed? Some people say that all apps must be installed in the Applications folder. Checking the web I get both answers.

2 - If it is allowed, is there a way to properly clean out? Because every website I found that describes this procedure is touting their own cleanup app.

Thank you

Replies

You can install Xcode on an external HD if you make the external HD your Mac's startup disk. Read the following article for more details:

https://www.swiftdevjournal.com/xcode-installation-questions/