What is the wisdom of storing the following reference files in the user's directory?

Might I have done something when installing XCode for them to go to ~/Library instead of, say, /Library ?

1.8G ~/Library/Developer/Shared/Documentation/DocSets/

0.3G ~/Library/Developer/Shared/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.4_3.docset

1.0G ~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleLion.CoreReference.docset

0.5G ~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.AppleiOS5_1.iOSLibrary.docset


Aside from the wisdom, if any, the solution suggested by Anne Onymous below works.

sudo mkdir -p /Library/Developer/Shared/Documentation
sudo mv ~/Library/Developer/Shared/Documentation/DocSets  /Library/Developer/Shared/Documentation/
ln -s  /Library/Developer/Shared/Documentation/DocSets  ~/Library/Developer/Shared/Documentation/DocSets

Doing so will significantly reduce the number of files in your home directory:

ls -lR ~/Library/Developer/Shared/Documentation/DocSets | wc
302148 1881376 20167032
  • Did Xcode install those files automatically or did you download them inside Xcode?
    – Hoshts
    Aug 16, 2012 at 7:45
  • Now that I see Anne Onymous's comment below, I recall clicking on 'install' in Preferences\Downloads\Documentation.
    – Calaf
    Aug 16, 2012 at 23:16

2 Answers 2


These files come from Xcode's Preferences -> Downloads -> Documentation panel, which downloads and updates documentation.

After a fresh install of Mountain Lion and Xcode, without doing anything special, I found the files there too.

Xcode may be putting these files in the user's home directory because the user doesn't by default have permission to write in /Library, or because different users may have different sets of documentation files.

In any case, it is user hostile to dump over 4 GB of non-user files in a user's directory, hopefully the Xcode team will fix this eventually.

In the meantime I'd try moving it to /Library/Developer/Shared and see if things still work.

  • If different users have different sets of documentation files, it would be an argument for consolidating the files in a shared location. Moving them after they landed under ~/. is no longer very helpful. Doing so would just incur a second hit on the time machine disk.
    – Calaf
    Aug 16, 2012 at 23:19
  • Xcode isn't sandboxed and can write files anywhere as it does when installing the developer tools in /usr/bin by prompting for an admin password.
    – bmike
    Aug 17, 2012 at 0:09
  • so... there is no wisdom. It is simply "user hostile".
    – Calaf
    Dec 3, 2012 at 18:27

Here are several cases where having documentation in the user home folder make sense:

  1. Each user of the Xcode program has different bookmarks, needs, choices of what to download
  2. Backup situations where only user files are preserved (common in corporate situations where they image and deploy apps systematically and therefore skip backing up files that come from the standard deployment process).
  3. Networked home folders where you work from more than one Mac would cause another location to fail.

Gatekeeper and other code signing / security checking technology makes it poor form to store added content (or content that updates outside the normal app update process) in /Applications. /Users/Shared is not a good place to store things since it breaks under the network home folder use case. Thus ~ is left as the least bad place to store this content.

  • 1- Surely bookmarks can be stored as pointers, no? 2- Migrating the documentation without the accompanying Xcode seems silly. Is the idea that programmers will develop for long stretches without attempting to compile? I don't understand what you mean by 3. But I see your point: So ultimately it's a question of avoiding to ask the users to enter the root password after a given application has already completed installation.
    – Calaf
    Aug 16, 2012 at 23:25
  • 1 sure, but why do extra work to break convention. 2. It's more about not backing up the app side of things. I would exclude these files from a CrashPlan backup in most scenarios as well even with them in ~. 3. Perhaps, but Xcode does authorize as root to install the command line tools, so I belive it's a conscious decision that ~ is the correct place by default.
    – bmike
    Aug 17, 2012 at 0:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .