15

(I have a mac running Mountain Lion with Xcode 4.5.2)

I changed my username a while ago, and Xcode has started recreating xcuserdata directories with the new username at $path_to_.xcodeproj/xcuserdata/blackl.xcuserdatad. I've been working with it like that since, and I can't remember if anything seemed to have reset after the change, so whatever was in there must not have been too important…

What does Xcode store in xcuserdata and what should I do about the old ones? There are some old projects I haven't opened since the change; I could just rename the directories in those. Newer projects will have two directories (blackl.xcuserdatad and one with the old username); what should I do in those cases?

1 Answer 1

22

You can safely delete the xcuserdata directories. It basically contains personal settings like breakpoints, user interface layout, open files, automatic snapshots configuration and so on.

Most people ignore those files in their version control software. I do that too.

BTW: there's another xcuserdata directory inside of $path_to_.xcodeproj/project.xcworkspace.

5
  • You don't mean to say it contains the snapshots themselves, do you? I thought those were stored in ~/Library/Developer/Xcode somewhere. As for the directories in project.xcworkspace, should I delete those too? Commented Nov 19, 2012 at 12:30
  • Those settings files are just plist, you can inspect them easily. WorkspaceSettings.xcsettings contains just the snapshot settings, not the snapshots. Mine has two keys HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges and SnapshotAutomaticallyBeforeSignificantChanges. Nothing important is saved inside the xcuserdata directory. Commented Nov 19, 2012 at 12:33
  • Okay. So I should just delete the old directories in $path_to_.xcodeproj/{xcuserdata,project.xcworkspace}? Commented Nov 19, 2012 at 12:34
  • how to delete them using terminal? I used "find . -name 'xcuserdata' -type d -delete" but nothing happened.
    – axunic
    Commented Feb 20, 2018 at 6:12
  • 1) Right click .xcodeproj file (or .xcworkspace file if you use Cocoapods) and choose Show Package Contents. 2) delete xcuserdata folder
    – Rameez
    Commented Mar 25, 2018 at 5:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.