-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux updatedb Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to updatedb on Linux, covering Arch Linux, CachyOS, and other distributions including updating locate database, database configuration, and search index management.
updatedb updates locate database.
Uses:
- Update database: Refresh file index
- Rebuild index: Recreate search database
- Maintain search: Keep locate working
- System maintenance: Maintain file index
Why it matters:
- Search accuracy: Keep search current
- New files: Index new files
- System maintenance: Regular updates needed
Basic usage:
# Update database
sudo updatedb
# Rebuilds locate databaseShow progress:
# Verbose mode
sudo updatedb -v
# -v = verbose (shows progress)Edit config:
# Edit config
sudo vim /etc/updatedb.conf
# Configure paths to indexSkip directories:
# In /etc/updatedb.conf
PRUNEPATHS="/tmp /var/tmp /var/cache"
PRUNEFS="NFS nfs nfs4"Systemd timer:
# Check timer
systemctl status updatedb.timer
# Enable timer
sudo systemctl enable updatedb.timerForce update:
# Update now
sudo updatedb
# Or via systemd
sudo systemctl start updatedb.serviceCheck permissions:
# Verify sudo access
sudo -v
# Check database location
ls -la /var/lib/mlocate/This guide covered updatedb usage, database updates, and configuration for Arch Linux, CachyOS, and other distributions.
- locate Guide - File searching
- find Guide - Advanced searching
-
updatedb Documentation:
man updatedb
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.