---
name: "locate.updatedb"
section: "8"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["freebsd", "openbsd", "macos"]
url: "https://new.carta.tech/locate.updatedb"
---

# locate.updatedb(8)

update locate database

## NAME

**locate.updatedb** – update locate database

## SYNOPSIS

**locate.updatedb** \[**--fcodes**=*dbfile*\] \[**--filesystems**=' *type* *...* '\] \[**--prunepaths**=' *dir* *...* '\] \[**--searchpaths**=' *dir* *...* '\] \[**--tmpdir**=*dir*\]

## DESCRIPTION

**locate.updatedb** updates the database used by [locate(1)](/locate/1.md). It is typically run once a week by the weekly(8) script.

The options are as follows:

- **--fcodes**

  Output to an alternate database file instead of the default */var/db/locate.database*. If ‘-’ is specified in place of the file name, send the database to the standard output.

- **--filesystems**

  A list of filesystem types to be traversed by [find(1)](/find/1.md). The default is ' ffs ufs ext2fs '.

- **--prunepaths**

  Set the list of parent directories that should not go in the database. The default is ' */tmp* */var/tmp* '.

- **--searchpaths**

  Set the list of directories to be put in the database. The default is ' */* '.

- **--tmpdir**

  Set the directory temporary files are stored in. The default is */tmp*.

The default settings are modified by the optional configuration file */etc/locate.rc*. It is a [sh(1)](/sh/1.md) script that can be used to set variables. The names of the variables match the names of the command line options, but in all caps.

## FILES

- */etc/locate.rc*

  configuration file

- */var/db/locate.database*

  default database

## SEE ALSO

[find(1)](/find/1.md), [locate(1)](/locate/1.md), [locate.mklocatedb(8)](/locate.mklocatedb/8.md), weekly(8) Woods, James A., “Finding Files Fast”, *;login*, 8:1, pp. 8-10, 1983.
