Question

Over time there are many past log entries (for either build or debug sessions) accumulated in the Log Navigator. How can I remove these entries?

Was it helpful?

Solution

Turns out this is what you have to do:

  1. Go to Organiser
  2. Go to Project tab
  3. Select your project
  4. Select the Delete button on the right hand side where it says "Derived Data includes Index, build output and logs"
  5. Close the project or workspace.
  6. Re-open the project or workspace.

Note that the comments are correct. This approach does delete the index, and build output in addition to the logs. It does warn that "The first indexing and rebuild of a project after that may be slower".

OTHER TIPS

I know this is a bit old, but I think the accepted answer is an awkward way to do it (though it will certainly work!). It's easier to do this in Finder.

By default, Xcode stores its data inside its DerivedData folder.

  1. Quit Xcode.
  2. In the Finder choose Go -> Go to Folder…. Paste ~/Library/Developer/Xcode/ into that. (Or otherwise navigate there.)
  3. Every Xcode build artifact (including logs, compiler object files and finished/linked executables) that hasn't been archived is inside DerivedData. So go ahead and drag DerivedData into the Trash.

You can, of course, delete individual folders instead. But since these folders rebuild are derived data and will be rebuilt completely when you rebuild your projects, there's very little reason not to delete all of DerivedData.

If you do a lot of work in the command line, you can do this there, too:

$ rm -fR ~/Library/Developer/Xcode/DerivedData

I do this several times per day sometimes, if I'm switching rapidly between branches and worried Xcode could get confused. And doing it after an Xcode update saves you from any worry that Xcode might not rebuild everything, requiring you to clean projects.

I should note that this only applies to DerivedData. Some of the other folders in ~/Library/Developer/Xcode are quite important:

  • Archives stores the result of every Product->Archive you've done. While you might want to delete some of these, you're rarely going to want to delete them all.
  • UserData stores your code snippets, fonts and colors, keybindings, and source control author names.

If you want to know what the rest are, have a look through them. But don't delete them blindly, like you can with DerivedData. :)

This works in Xcode 5 and may work in Xcode 4:

If you just want to clear the million entries in the Log Navigator, try closing the project/workspace and reopening it. (Close, Open Recent)

This cleared the Log Navigator for me, was less effort than doing anything in the Organizer window, and did not delete the index or build output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top