Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to remove with purge all entries of locate and its database.

I tried

apt-get purge locate

and

rm /etc/updatedb*

But is the database gone also?
Where is the updatedb database located on debian squeeze?

I would like to delete it manually too, so I can cleanly reinstall it

share|improve this question

3 Answers 3

man updatedb

search for 'FILES'

mine says:

FILES
       /etc/updatedb.conf
              A configuration file.  See updatedb.conf(5).

       /var/lib/mlocate/mlocate.db
              The database updated by default.
share|improve this answer
    
That's mlocate, not locate. Though /var/lib/locate is not a bad guess for locate. –  Dennis Kaarsemaker Dec 1 '12 at 11:36
    
I'm trying to give both general advice and the results of following said advice on my system. –  ptman Dec 1 '12 at 11:39
1  
Oh, and it seems like mlocate is the standard locate on Debian. –  ptman Dec 1 '12 at 11:43
    
mlocate is not installed, neither slocate –  rubo77 Dec 2 '12 at 8:09

There is /no way/ to determine where the database is other than decompiling the executable. If you have an /etc/updatedb.conf, you can look in there. I don't. You can read the man page for locate, which says the default location is /var/cache/locate/locatedb. Mine isn't there. You can use locate itself to search for files named "updatedb" or "locatedb", the two most-common prefixes for the config and database files. My system doesn't use either. I'm using Cygwin on Windows 7.

share|improve this answer
    
and if you search for mlocate.db? –  rubo77 Oct 19 '13 at 21:06
    
@phil-goetz There's no need to decompile. You can get the exact location with a one-liner if you have strace installed: $ sudo strace updatedb 2>&1 | grep -o "^open.*O_RDWR.*" –  Cengiz Can Sep 4 at 7:23
up vote 0 down vote accepted

On debian, the locate database is stored by default in

/var/cache/locate/locatedb

If you use mlocate as search indexer:

The mlocate database is stored at

/var/lib/mlocate/mlocate.db

see: How can I view updatedb database content, and then exclude certain files/paths?

share|improve this answer

Your Answer

 
discard

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.