Ubuntu MATE 20.04: Where is /etc/updatedb.conf?

Just changed from MATE 18.04 to 20.04. Now I cannot find /etc/updatedb.conf.

I want to customize the search path of updatedb, which I believe is run as a cron job on MATE to update the locatedb used by the locate(1) command.

In 18.04 that was done through setting the PRUNEPATHS variable in /etc/updatedb.conf. In 20.04 there is no /etc/updatedb.conf. Is there a recommended way to customize the updatedb's search path in 20.04?

here's my /etc/updatedb.conf on 20.04 if that helps you ...

# PRUNENAMES=".git .bzr .hg .svn"
PRUNEPATHS="/tmp /var/spool /media /var/lib/os-prober /var/lib/ceph /home/.ecryp
tfs /var/lib/schroot"
PRUNEFS="NFS afs autofs binfmt_misc ceph cgroup cgroup2 cifs coda configfs curlf
tpfs debugfs devfs devpts devtmpfs ecryptfs ftpfs fuse.ceph fuse.cryfs fuse.encf
s fuse.glusterfs fuse.gvfsd-fuse fuse.mfs fuse.rozofs fuse.sshfs fusectl fusesmb
 hugetlbfs iso9660 lustre lustre_lite mfs mqueue ncpfs nfs nfs4 ocfs ocfs2 proc 
pstore rpc_pipefs securityfs shfs smbfs sysfs tmpfs tracefs udev udf usbfs"

Try installing mlocate.

It appears that /etc/updatedb.conf is provided by that package.

apt-file search updatedb.conf
mlocate: /etc/updatedb.conf
mlocate: /usr/share/man/man5/updatedb.conf.5.gz


Thanks for the conf file. I placed it in /etc/updatedb.conf but it did not work in the sense that it was not read by the database updater. It appears that "locate" provided by the "locate" package does not read this file.

Afterward I deleted that file, uninstalled "locate", and installed "mlocate". Among other things, mlocate creates /etc/updatedb.conf, which then can be customized as necessary.

Thanks for the pointer. I uninstalled "locate" and installed "mlocate". That created the file /etc/updatedb.conf. I customized that file verified that the update database changed accordingly. Problem solved!

1 Like