updatedb

Rebuild the locate database

medium risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
What it does

Walks the filesystem and rewrites the database used by locate. Normally run from cron daily.

Common flags
FlagMeaning
--prunepathsDirectories to skip
Examples
sudo updatedbRefresh the locate index · explain & risk-check →
Related
locate find
Open the full explainer →More in Files & Archives

Reference text is hand-written and may be incomplete — check man updatedb for your version. Test destructive commands on a non-production system first.