Linux – just disable updatedb

iolinuxperformanceupdatedb

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.).

Best Answer

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
    mlocate-0.26-3.fc19.x86_64
    
  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
    
Related Question