Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I Install Xcode 6 or 7 on an external drive?

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?

like image 642
user1854056 Avatar asked Oct 28 '15 20:10

user1854056


People also ask

Can I install Xcode on external drive Mac?

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.

How much disk space do you need for Xcode?

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.

Can you run Mac applications from an external hard drive?

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.


1 Answers

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:

  1. Create a new APFS partition on external SSD with 100GB storage. (say NewVol)

  2. Create new macOS user and change its home directory to /Volume/NewVol/user

  3. 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.

like image 84
Anirudh Gupta Avatar answered Sep 23 '22 05:09

Anirudh Gupta