How to update the locate database:

Choose Optimize > Update Locate Database.
The locate tool is a command-line alternative to Spotlight that allows you to quickly find files on your Mac. When locate can’t find a file that you know exists, try updating the locate database.
Choose Optimize > Update Locate Database.
This task is part of the weekly maintenance scripts.