Your own personal IT department

Is mlocate.db in /var/lib/mlocate huge and filling up your space

mlocate.db is the index of /

Linux uses mlocate.db file to store the search indexes, so if there are too many files being indexed then mlocate.db can get very large, resulting in loss of space and slowed performance. The “fix” is to exclude files that don’t need to be indexed.

sudo vim /etc/updatedb.conf

Add the relevant directories that you want to exclude from indexing to the PRUNEPATHS variable. Write the file and update the mlocate.db index file by running

sudo updatedb

Also, any old mlocate.db.XXXXXXX files in /var/lib/mlocate can be removed, as they are failed updates (usually from rebooting whilst the indexing is running). Check the file dates with:

ls -l /var/lib/mlocate

 
Comments

No comments yet.

Leave a Reply