Can I Disable Updatedb.mlocate?


Answer :

It can be killed with:

sudo killall updatedb.mlocate 

Or:

sudo kill -9 <PID> 

It runs every day by cron. Disable it with:

sudo chmod -x /etc/cron.daily/mlocate 

And if you want to re-enable it:

sudo chmod +x /etc/cron.daily/mlocate 

I did not want to totally eliminate the process but I did want to make it happen less frequently so I worked out how to set it to run weekly instead of daily. This is based on the accepted answer above but probably best listed as its own answer as it's not disabling it.

That said... It's rather simple and appears to work just fine.

sudo chmod -x /etc/cron.daily/mlocate sudo cp /etc/cron.daily/mlocate /etc/cron.weekly/mlocate sudo chmod +x /etc/cron.weekly/mlocate 

The first one disables the cron job. The second moves it to the weekly tasks. The third command sets the permissions so that it is enabled. Daily, hourly, weekly, and monthly are all options.


I never used locate, so I removed it. sudo dpkg -P mlocate See Also: https://wiki.archlinux.org/index.php/File_system_search


Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?