83

I would like to remove from Mac OS-X taskbar (Dock) the XCode's recent project menu items.
Everywhere I am searching it says the File->Open Recent->Clear Menu it will clear, but not.
It doesn't clear from Dock, it clears from inside the XCode Recent menu.
I believe I should dig somewhere is OS filesystem, but I don't know where.

It was an XCode 4.2 intalled, I did a complete uninstall and installed version 4.3.
But I couldn't clear the Dock's projects menu at version 4.3 either!

Jeff
  • 3,829
  • 1
  • 31
  • 49
  • After several restart of the OS it just disappeared the menu. For sure it is not enough to close and open the XCode –  Mar 13 '12 at 11:04
  • In Xcode 7.x after doing above mentioned steps, just logout and login again solved my problem – arunjos007 Sep 12 '16 at 04:48

6 Answers6

195

Here's what works for me:

  1. Launch Xcode
  2. Select File->Open Recent->Clear Menu
  3. Right-click the Xcode icon and select "Show All Windows". You should now see only your current document in the recents list at the bottom
  4. Quit Xcode.
    The recents list should now only be populated with your single current project.
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
marcprux
  • 9,845
  • 3
  • 55
  • 72
  • 6
    Didn't seem to work in Xcode 4.6.2. What did work was I cleared the menu as above, then removed Xcode from the dock, then re-added and the list was reset. – nh32rg May 17 '13 at 13:29
  • 1
    With Xcode 5.1 (maybe 5.0 too), simply doing `File->Open Recent->Clear Menu` will do the trick. – Cœur Dec 16 '13 at 10:52
  • 1
    3 year on - this is still relevant on Xcode 6. Upvoted. – callisto Mar 27 '15 at 07:16
  • When I choose "Show all windows", a horizontal tray appears along the bottom of the screen with big icons for all projects/files I want to get rid of in the dock's MRU. The File/Open Recent... MRU does get cleared, though. – Nicolas Miari Feb 08 '16 at 10:44
  • 7
    In order to clear the recent items in the Dock, follow the listed steps and then kill the "Dock" process in "Activity Monitor". It will restart automatically. – CrimsonChris Apr 20 '16 at 00:07
  • 1
    Worked for me in Xcode 7. File->Open Recent->Clear Menu then restart. Did not take effect until the restart. I didn't have to kill anything... just close the app and restart. – jptknta May 15 '16 at 20:23
  • @CrimsonChris's suggestion worked for me with Xcode 7.3.1. Not killing `dock` didn't work - though if I rebooted it likely would have had the same effect. – Peter Clark Jul 20 '16 at 20:22
  • In Xcode 7.x after doing above mentioned steps, just logout and login again solved my problem – arunjos007 Sep 12 '16 at 04:47
  • I guess logging out/restarting works too, because it ultimately involves relaunching the Dock process. – Nicolas Miari Nov 09 '16 at 01:40
  • This might be a silly question, but is it seriously true you cannot remove a single item? – Dror Bar Mar 28 '20 at 08:14
10
  1. Start Xcode
  2. In Menu: File -> Open Recent -> Clear Menu
  3. Close Xcode
  4. Remove Xcode from Dock
  5. Reboot
fabb
  • 11,660
  • 13
  • 67
  • 111
8

Turned out that all you need to do is:

  1. Clear Recent Menu with Xcode
  2. killall Dock
Pang
  • 9,564
  • 146
  • 81
  • 122
Hoang Phan
  • 81
  • 1
  • 1
6

Select File->Open Recent->Clear Menu

Remove Xcode from the dock

Re-add Xcode to the dock

Adamontherun
  • 455
  • 6
  • 17
3

Warning: This solution will wipe the passwords of all your developer accounts in Xcode (Xcode > Preferences > Accounts); If you apply this method, you will have to re-enter them afterwards.


This is what worked for me in El Capitan / Xcode 7. In Terminal:

% defaults delete com.apple.dt.Xcode
% killall Dock

(Source: https://simon.heimlicher.com/articles/2011/07/26/disable-recent-items)

Strangely, the recommended command:

% defaults delete com.apple.dt.Xcode RecentDocuments

...gives the message:

Domain (com.apple.dt.Xcode) not found. Defaults have not been changed.

...so I removed the RecentDocuments part and decided to go nuclear. Haven't checked what else is nuked (other than the passwords mentioned above), so use at your own risk.

Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
2
  1. Open Xcode then choose: File -> Open Recent -> Clear Menu
  2. Open Terminal then type: killall Dock
Huynh Inc
  • 2,010
  • 1
  • 25
  • 42