28

Can I do something about it? I'm running out of disk space.

muru
  • 207,228
evencoil
  • 787

4 Answers4

36

On one of my systems that acts as a backup server, mlocate.db hit 9GB. The solution was to exclude the backup directories from locate, since I had no need to search them.

I did this by adding the backup directory to PRUNEPATHS in /etc/updatedb.conf.

Running sudo updatedb then reduced it to 1.6MB (and saves a huge amount of time indexing all of those files).

user76225
  • 361
9

If you have lots and lots of files on your machine, you may want to consider pruning some paths from the database. You can do this in /etc/updatedb.conf under PRUNEPATHS. You can also prune file systems (like nfs, if you so desire).

2

800MB sounds pretty much. My /var/lib/mlocate/mlocate.db is about 8MB only (fresh install on 10.04 release date). You can safely delete it, if you run sudo updatedb, it'll be recreated.

Lekensteyn
  • 178,446
-1

Its a database of all files in your root directory. It is used by locate utility. if you delete this file locate will no longer work.

binW
  • 13,194