Instantly share code, notes, and snippets.

Embed
What would you like to do?
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: http://lduros.net/posts/tracker-sucks-thanks-tracker/

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

Directories

~/.cache/tracker
~/.local/share/tracker

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-*
/etc/xdg/autostart/tracker-extract.desktop
/etc/xdg/autostart/tracker-miner-fs.desktop
/etc/xdg/autostart/tracker-store.desktop
/etc/xdg/autostart/tracker-miner-apps.desktop
/etc/xdg/autostart/tracker-miner-user-guides.desktop

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-* ./
for FILE in `ls`; 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

@paulochf

This comment has been minimized.

Copy link

paulochf commented Apr 29, 2016

for FILE in ls; do echo Hidden=true >> $FILE; done

Did you mean for FILE in ls tracker-* ?

@paulochf

This comment has been minimized.

Copy link

paulochf commented Apr 29, 2016

Another option: in Ubuntu, one can use this GUI. If it's not installed already, just do sudo apt-get install tracker-gui.

@jurikolo

This comment has been minimized.

Copy link

jurikolo commented Nov 23, 2016

There is also tracker-miner-rss.desktop in Fedora 24.

@anisse

This comment has been minimized.

Copy link

anisse commented Mar 14, 2017

Be careful, you'll add Hidden=true to all files in ~/.config/autostart ; this should be better:
for FILE in tracker-*.desktop ; do echo Hidden=true >> $FILE; done

@nick3499

This comment has been minimized.

Copy link

nick3499 commented Aug 6, 2017

tracker-preferences is also helpful.

@tonylambiris

This comment has been minimized.

Copy link

tonylambiris commented Sep 9, 2017

@paulochf has the right idea

for FILE in tracker-*.desktop; do echo Hidden=true >> $FILE; done
@Mortal

This comment has been minimized.

Copy link

Mortal commented Oct 9, 2017

It appears tracker has been split into two packages, at least on Arch Linux: Everything depends on the tracker package, which only installs /etc/xdg/autostart/tracker-store.desktop, and the tracker-miners is recommended by tracker and installs all the other autostart files. As far as I can tell you can now simply remove tracker-miners.

@clumsyfingers

This comment has been minimized.

Copy link

clumsyfingers commented Oct 14, 2017

NB use at your own risk

seems you can prevent tracker-store from starting by deleting (or backing up) /usr/lib64/systemd/user/tracker*.service
might be located elsewhere on your system
the files are called tracker-extract.service, tracker-store.service etc
at least tracker-store hasnt started since i killed those files. not seen any ill effects including searcing in nautilus

@maysam-h

This comment has been minimized.

Copy link

maysam-h commented Dec 22, 2017

this is a good tutorial but unfortunately this does not work for me. I made a simple script to kill the trackers process. It will surely kill the process before it exits. Here is the link: https://goo.gl/7A23fK

@vancluever

This comment has been minimized.

Copy link
Owner

vancluever commented Jan 5, 2018

WOW I never noticed this had so much traffic! I hope that everyone found it (somewhat) useful - I personally didn't intend it to be anything else other than personal notes. But yeah all these comments withstanding this is probably pretty out of date information. I actually switched to Arch and i3 for a long time a few months after writing this and haven't really bothered to touch it on my Fedora installs (I don't think I've noticed anywhere close to the same performance hit that I think led me to it in the first place).

@mettacrawler

This comment has been minimized.

Copy link

mettacrawler commented Feb 3, 2018

You can use Gnome Settings -> Search to disable or restrict tracker.
When you start that GUI it shows which applications not which file system locations.
Click on the gear icon to access the controls for enabling/disabling file system locations.
Unfortunately, when I use an sshfs mount inside my home directory tracker access to it cannot be controlled via that GUI.

@grigio

This comment has been minimized.

Copy link

grigio commented Mar 6, 2018

Thanks

@scruss

This comment has been minimized.

Copy link

scruss commented May 14, 2018

Can't live without tracker. With an SSD, if it takes more than momentary time to index, there's something wrong. If it's chewing CPU, there's a chance it's found a file that's breaking the indexer. You can find and triage the offending file with this process: https://askubuntu.com/a/914602/68093

@soerensen3

This comment has been minimized.

Copy link

soerensen3 commented Aug 8, 2018

Thanks!

@Mark-Booth

This comment has been minimized.

Copy link

Mark-Booth commented Aug 14, 2018

Thanks for this gist, it was really useful, but please update it to use tracker-*.desktop; rather than ls since not everyone reads through all of the comments to find the corrections. I've just had to manually remove the lines added to all of my other autostart files.

@maage

This comment has been minimized.

Copy link

maage commented Sep 30, 2018

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