The capacity of my SSD is just 60Gb, and I have just over 5Gb of free space at the moment. Is there a way to install Xcode directly on the external drive? Or to do so I'd have first to make this drive bootable and boot my system from it?
Can you run Xcode from an external hard drive? sure. you will need to make a SYM link to it from your ~user folder to the external.
The xip itself is 11 GB so that's obviously no indication. The closest I could get to an answer was the comment about Xcode 13.2. 1 to this answer which says 45 GB needed to install, presumably using the AppStore though. The top answer to QA you linked says it now needs 49GB.
macOS is extremely tolerant with respect to the source of the application you are trying to run. There is no problem other than OS version compatibility and speed to run an app from the external HDD, memory card, or a USB drive. CD may be a problem sometimes, as the Mac can't write to it if needed.
There are various possible solutions, including, making use of symlinks, dual booting two versions of macOS (one on external SSD), and many more.
But the best way I found was to create a new macOS user and change its home directory to external SSD (by going to advanced user settings under Users & Groups System Preferences).
The exact steps I followed:
Create a new APFS partition on external SSD with 100GB storage. (say NewVol)
Create new macOS user and change its home directory to /Volume/NewVol/user
Logged into the new user with external SSD connected, and installed xcode in ~/Application. (i.e. the local Application folder, not /Application)
Why this works best is because you don't need to manually manage symlinks, also symlinks might create problems during builds. All the required files (including builds and temporary files) are stored in user directory, so no space occupied on internal drive. Also, no hassle of installing a complete separate OS, and going through cycles of reboots to switch the OS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With