Ubuntu 19.10: why is the "locate" command missing?

OS: Ubuntu 19.10

When I ran locate plymouth, I got

dkb@dkb-uee:~$ locate plymouth

Command 'locate' not found, but can be installed with:

sudo apt install mlocate


So I installed mlocate and now locate works.

As far as I can remember, since Ubuntu 11.04, locate has always been there.

Why was it excluded in Ubuntu 19.10?

Asked By: DK Bose


There was this thread: mlocate – what is it good for? with this:

The Ubuntu Foundations team was recently looking at an issue with
mlocate[1] and the effect it has on all users of Ubuntu. While that
specific issue is fixable there are also issues[2,3] with keeping
PRUNEFS and PRUNEPATHS current in updatedb.conf. So we ended up
questioning the usefulness of installing mlocate by default on systems
at all. We believe that find is an adequate replacement for mlocate …

This initial post called for opinions on the matter.

Later, in the same thread, there’s this:

My own sense is that this is not a server vs desktop thing; there are users
of locate, to be sure, but I believe they are a very small minority on both
desktop and server (small on desktop because the user will generally use the
gui instead; small on server because most server use is not interactive at
the shell). I don’t think the benefit of having locate available by default
justifies the daily disk thrashing / energy usage on every Ubuntu machine
everywhere. I think it’s not onerous for those who want to use locate to
manually install it the first time they need it on a machine.

And this:

Well, I don’t think this is an argument for keeping mlocate installed by
default on desktops, because effectively this means that you have TWO
indexers on your desktop system – both tracker and mlocate. It looks like
nautilus currently depends on tracker, so I’m not sure how one would
uninstall it and usefully fall back to the mlocate backend anyway, but at
most I’d say this should be expressed as ‘Depends: tracker | mlocate’ in
nautilus, and not have mlocate kept around on the system updating its
database daily just in case a user removes tracker.

The bottom line is that if you want it, just install it.

Answered By: DK Bose
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.