By default, updatedb indexes only your root partition when run. To be able to extend locate‘s reach and get updatedb to index external devices such as USB harddisks and flash drives, edit the /etc/updatedb.conf file. Modify the following line:
PRUNEPATHS=”/tmp /var/spool /media”
so that it reads
This adds the devices mounted in the /media directory to the search path.