Home » Questions » Computers [ Ask a new question ]

How to clear Recent Items in OS X?

How to clear Recent Items in OS X?

I want to clear the recent items lists on my computer regardless of what piece of software they are from. I know of the following lists so far:

Asked by: Guest | Views: 337
Total answers/comments: 1
bert [Entry]

"As far as I know, there is no built-in way this can be done, as the recent documents are stored in each application's preference file. However, a little AppleScript and:

tell application ""Finder""
set fls to every file in alias "":Users:ben:Library:Preferences:""
set AppleScript's text item delimiters to {""""}
repeat with fl in fls
if name extension of fl is ""plist"" then
set fn to name of fl
set pid to text items 1 thru -7 of fn as text
if pid = ""com.apple.Xcode"" then
try
do shell script ""defaults delete "" & pid & "" NSRecentXCFileDocuments""
do shell script ""defaults delete "" & pid & "" NSRecentXCProjectDocuments""
end try
else
try
do shell script ""defaults delete "" & pid & "" NSRecentDocumentRecords""
end try
end if
end if
end repeat
end tell
This deals with normal applications and Xcode, but not the Apple menu or other applications which don't follow the pattern."