Can anybody shed light on which directories OS X decides to put in the locate database and which it decides to omit? It's pretty clear that ~/Library is out - which others? And how do I modify this so that every time updatedb is called, it actually scans all my directories?

This question has (sort of) been asked before here, but it wasn't answered well, and the question of default directories for the (cron task?) updatedb never even came up.

  • Have you looked at /etc/updatedb.conf? – muru Feb 10 '15 at 18:10

On Mac OS 10.10.2, look at /etc/locate.rc file for the PRUNEPATHS field. From Apple's man page for locate.updatedb:


The locate.updatedb utility updates the database used by locate(1). It is typically run once a week by the /System/Library/LaunchDaemons/com.apple.locate.plist job. The contents of the newly built database can be controlled by the /etc/locate.rc file.

Correction: The above link and quoted content is for Mac OS 10.9. The setup appears to be same in OS 10.10.2.


Your ~/Library, ~/Documents, ~/Applications ... etc are all created with 700 as permission. Locate will skip them. If you want them to be included in your locate database, change the permission to 755.

chmod 755 ~/Library
sudo /usr/libexec/locate.updatedb

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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