A file shows in "locate" command but don't exist. Why?
locate
uses a database called locatedb
. It's normally updated by system cron jobs. If the DB hasn't been updated, it'll show non-existent or new files/directories. you can force an update with the updatedb
command. See this link among others.
Manpage of locate
clearly says -
locate reads one or more databases prepared by updatedb and writes
file names matching at least one of the PATTERNs to standard output,
one per line.
By default, locate does not check whether files found in database still
exist; locate can never report files created after the most recent
update of the relevant database.
Source
locate is based on a database which is usually updated once a day via cron.
Force an update: run updatedb
and your locate iceweasel
will return up-to-date results.