How to Completely Disable the ‘plocate-updatedb’ Timer in Ubuntu Server

In Ubuntu Server and other Debian-based Linux distributions, the plocate-updatedb.timer is a recurring systemd timer unit responsible for executing the plocate-updatedb.service (formerly known as mlocate or locate). This service triggers a daily, aggressive filesystem crawl to construct and update a highly compressed, indexed database of every file and directory path on the system. This allows administrators to use the locate command for near-instantaneous file searching. While useful on personal workstations or monolithic legacy servers, this aggressive filesystem crawling introduces catastrophic, unexpected read-heavy I/O spikes (often colloquially known as the “updatedb storm”) on high-performance infrastructure, such as NVMe database clusters, read-only immutable containers, or high-density hypervisors. On these systems, arbitrary filesystem crawling destroys page cache efficiency and steals critical IOPS from production workloads.

This guide explains how to completely disable the plocate-updatedb timer in Ubuntu Server, enforcing an absolute block on automated filesystem indexing and reclaiming disk I/O performance.

Stop and Mask the plocate-updatedb Timer

Because this timer is intrinsically linked to the plocate package, simply disabling it is insufficient; package managers like apt will often silently re-enable it during updates. To enforce a strict, immutable block, we must explicitly mask the unit.

  1. Log into your Ubuntu Server via SSH using an account with sudo privileges.
  2. Stop the timer to halt any currently scheduled execution:
    sudo systemctl stop plocate-updatedb.timer
  3. Stop the associated service unit that the timer invokes, aborting any active filesystem crawl:
    sudo systemctl stop plocate-updatedb.service
  4. Mask both the timer and service units. This symlinks them to /dev/null, creating a hard block against future activation by package triggers, cron jobs, or manual invocations:
    sudo systemctl mask plocate-updatedb.timer
    sudo systemctl mask plocate-updatedb.service
  5. Optional but recommended: For absolute strictness, especially on minimal immutable images, you can completely purge the package and its database to reclaim disk space:
    sudo apt-get purge plocate
    sudo rm -rf /var/lib/plocate/

Verify the Service Lockdown

By masking the timer and its associated service (or purging the package entirely), you guarantee that systemd will completely reject any attempt to invoke the daily aggressive updatedb filesystem crawl, eliminating the risk of unexpected I/O storms.

To verify the lockdown is successful (if you chose to mask rather than purge), attempt to start the timer manually:

sudo systemctl start plocate-updatedb.timer

Systemd will return a fatal error stating that the unit is masked (e.g., Failed to start plocate-updatedb.timer: Unit plocate-updatedb.timer is masked). Furthermore, running systemctl list-timers --all will confirm that the plocate-updatedb.timer is completely absent from the active timers list. The server’s disk I/O pipeline is now strictly optimised, ensuring IOPS are dedicated entirely to application workloads rather than background indexing operations.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.