I have a timeshift user with backups in my /home. Every time after boot when I search for something with locate, all the timeshift directories are shown to me. To fix this issue, I added /home/timeshift to the PRUNEPATHS variable in /etc/alternatives/updatedb. I'm running Debian 10. On Arch I had the same issue and resolved it by adding the path to /etc/updatedb.conf. On Debian I don't have this file, so I changed /etc/alternatives/updatedb.

When running updatedb manually after boot, locate doesn't show me the PRUNEPATHS anymore. But when I first start the system, updatedb shows me my /home/timeshift. Changing PRUNEPATHS in /etc/cron.daily/locate does not help either.

1 Answer 1


/etc/alternatives/updatedb is a symbolic link to the actual updatedb script/binary of the locate variant that is currently in use on your system. If you edit it, the changes will be applied through the link to the actual /usr/bin/updatedb.<variantname> script... and whenever the locate package is updated, the package management will overwrite that script and your changes will be lost.

(There are two variants of locate in Debian 10: locate and mlocate. If you have both installed, then the /etc/alternatives mechanism will be used to determine which one will be used. The system administrator can use update-alternatives --config locate to switch the active variant.)

Debian 10 also has a man page for /etc/updatedb.conf, so if that file does not exist, you should just create it if you need non-default settings for updatedb.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .