Clear Recents folder in Finder on MacBook

MAC OS - Terminal command to clear RecentDocuments?

defaults delete RecentDocuments
Domain ( not found.
Defaults have not been changed.

defaults delete RecentDocuments
Domain ( not found.
Defaults have not been changed.

I need to be able to clear the Recent Documents on my Macbook which currently shows the last 1500+ items I've opened.
The APPLE Logo, Recent Items, Clear Menu doesn't clear the items in Recents when I open Finder.

Anyone got a quick and easy way to do it via Terminal?

By the way, to clear all the up arrow / down arrow history in terminal type history -c and press ENTER.
Erika KoelleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Which version of OS X do you have?   They're may be a bit different from system to system.

Just turn it off.
Go to System Preferences -->General --> On Recent Items, Select None
defaults write -g NSNavRecentPlacesLimit -int 0

Then delete the entries - if you have the same version I have.
defaults delete NSGlobalDomain NSNavRecentPlaces

Then delete all the other recent lists for each individual app.  This is an easier line than going through defaults and finding each apps defaults file and clearing it.
rm -f ~/Library/Preferences/*LSSharedFileList

Then restart Finder
killall Finder

You must restart the Finder for it to reload the recent files lists.  Otherwise, Finder will continue to show the previous files loaded.  If you didn't also turn off the items, when you quit, it will still write the previous items back along with the newest recent items.
Erika KoelleAuthor Commented:
I'm trying to flush out all the items in Finder (Favorites / Recents).  I have over a thousand JPG files in there that I want to not see in my recents.  I'm running macOS High Sierra 10.13.3
rm -f ~/Library/Preferences/*LSSharedFileList

If you mainly opened with Apple's Preview App, you can specifically remove and

You may have to log out then log back in.
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Erika KoelleAuthor Commented:
I've attempted the command below but it doesn't do anything to remove items in my Recents folder:
rm -f ~/Library/Preferences/*LSSharedFileList

I logged off and back on and that didn't change anything.

-bash: remove: command not found

Any other tips?
The command is rm, not remove.
Erika KoelleAuthor Commented:

ERROR Received Back:
rm: No such file or directory
That means it that you're not in the correct directory.

I gave you the full command previously.
rm -f ~/Library/Preferences/*LSSharedFileList

If that didn't work then something's missing in the command.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.