Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is updatedb necessary at all? I never use locate and my servers tend to have dozens of millions of files which usually makes updatedb to run for a long time and consume I/O needed by MySQL and/or other software.

Can I just remove it from cron and expect everything to work? (by everything I mean usual software found on server: linux, cpanel, mysql, apache, php etc.).

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Yes you can disable it in the crons or remove the package that provides updatedb. On a Red Hat system you'd go about the steps in determining if anything requires it prior to removal.

  1. First find out where the program is located on disk.

    $ type updatedb
    updatedb is /usr/bin/updatedb
  2. Next find out what package provides updatedb.

    $ rpm -qf /usr/bin/updatedb
  3. See if anything requires mlocate.

    $ rpm -q --whatrequires mlocate
    no package requires mlocate
  4. Nothing requires it so you can remove the package.

    $ yum remove mlocate
share|improve this answer

You can disable the scanning of directories that has many files (/var/www for example) by editing the /etc/updatedb.conf configuration file. If you really want to disable it, then just remove the cronjob.

share|improve this answer

Remove it using your package manager, if another package uses it, you will know, since it has to depend on it (package dependency).

I have a server with Nginx, php-fpm and mysql, and it works beautifully without updatedb.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.