Skip to content

Instantly share code, notes, and snippets.

Last active May 2, 2024 16:26
Show Gist options
  • Save vancluever/d34b41eb77e6d077887c to your computer and use it in GitHub Desktop.
Save vancluever/d34b41eb77e6d077887c to your computer and use it in GitHub Desktop.
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here:

After discovering it chowing 2 cores, I decided to go about disabling it.



After wiping and letting it do a fresh index on my almost new desktop, the total size of each of these directories was a whopping 3.9 GB!

Startup Files

On my Ubuntu GNOME setup, I found the following files:

$ ls  /etc/xdg/autostart/tracker-*

You can disable these by adding Hidden=true to them. It's best done in your local .config directory because 1) you don't need sudo and 2) you are pretty much guaranteed that your changes won't be blown away by an update.

The tracker Binary

Running tracker will give you a vast array of tools to check on tracker and manage its processes.

$ tracker
usage: tracker [--version] [--help]
               <command> [<args>]

Available tracker commands are:
   daemon    Start, stop, pause and list processes responsible for indexing content
   info      Show information known about local files or items indexed
   index     Backup, restore, import and (re)index by MIME type or file name
   reset     Reset or remove index and revert configurations to defaults
   search    Search for content indexed or show content by type
   sparql    Query and update the index using SPARQL or search, list and tree the ontology
   sql       Query the database at the lowest level using SQL
   status    Show the indexing progress, content statistics and index state
   tag       Create, list or delete tags for indexed content

See 'tracker help <command>' to read about a specific subcommand.

Non-Invasive Disable Cheat Sheet

This disables everything but tracker-store, which even though it has a .desktop file, seems tenacious and starts up anyway. However, nothing gets indexed.

tracker daemon -t
cd ~/.config/autostart
cp -v /etc/xdg/autostart/tracker-*.desktop ./
for FILE in tracker-*.desktop; do echo Hidden=true >> $FILE; done
rm -rf ~/.cache/tracker ~/.local/share/tracker

Note that tracker daemon -t is for graceful termination. If you are having issues terminating processes or just want to take your frustration out, tracker daemon -k immediately kills all processes.

After this is done, tracker-store will still start on the next boot. However, nothing will be indexed. Your disk and CPU will be better for wear.

$ tracker status
Currently indexed: 0 files, 0 folders
Remaining space on database partition: 123 GB (78.9%)
All data miners are idle, indexing complete

Other References

Copy link

Ubuntu 22.04 (workaround to disable Tracker3)

To disable Tracker3 on Ubuntu 22.04 and avoid updates:

sudo apt-mark hold tracker
sudo apt-mark hold tracker-extract
sudo apt-mark hold tracker-miner-fs

sudo chmod -x /usr/libexec/tracker-extract-3
sudo chmod -x /usr/libexec/tracker-miner-fs-3

tracker3 reset --filesystem --rss # Clean all database
tracker3 daemon --terminate

To undo:

sudo apt-mark unhold tracker
sudo apt-mark unhold tracker-extract
sudo apt-mark unhold tracker-miner-fs

sudo chmod +x /usr/libexec/tracker-extract-3
sudo chmod +x /usr/libexec/tracker-miner-fs-3

tracker3 daemon --start

This solution is a workaround. But it works.

If you want to check all settings of Tracker3 for the current user, run the command:

gsettings list-recursively | grep Tracker3

In this settings it is possible to enable or disable the Tracker3 for specific directories.

This makes it so that Nautilus crashes if you attempt to search anything. Beware

Copy link

cfgnunes commented May 2, 2024

Hi, @fir3-1ce ! In fact... But I find another solution:

Step 1

systemctl --user mask tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-rss-3.service tracker-writeback-3.service tracker-xdg-portal-3.service tracker-miner-fs-control-3.service

Step 2

tracker3 reset --filesystem --rss

Step 3
Reboot the system


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment