How To Completely Disable Tracker, GNOME's File Indexing And Search Tool

Tracker high CPU usage Linux

Tracker is a file indexing and search tool for Linux. Gnome makes use of it for some of its functionality, and as a result, Tracker is installed by default on quite a few Linux distributions.

The tool speeds up searching and enables full-text search in the Files app, makes the metadata-based batch rename feature to work in the Files app, and enables file and folder search in the Activities Overview. There are some GNOME apps that depend on it too (and don't work at all without it), like Music or Photos. Without Tracker, you'll lose these features, so take this into consideration before completely disabling Tracker.

While it brings a number of useful features to the GNOME desktop, Tracker can also have a performance impact in some cases. These performance issues are supposedly fixed, and Tracker is now even installed by default in Ubuntu 19.04 , 19.10 and 20.04 (it's not installed by default in older versions, like Ubuntu 18.04). But there are still users encountering performance issues with Tracker, or users who consider it too resource intensive.

Those who do not want to use Tracker cannot remove the application in most cases, because other packages depend on it. This is an example from Ubuntu 19.04:

$ sudo apt remove tracker tracker-extract tracker-miner-fs

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gir1.2-clutter-gst-3.0 gir1.2-evince-3.0 libgsf-1-114 libgsf-1-common libmusicbrainz5-2
  libtagc0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  gnome-shell-extension-desktop-icons gnome-sushi insync-nautilus nautilus
  nautilus-mediainfo nautilus-share tracker tracker-extract tracker-miner-fs ubuntu-desktop
  ubuntu-desktop-minimal
0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.
After this operation, 5,517 kB disk space will be freed.
Do you want to continue? [Y/n]

So trying to remove Tracker on Ubuntu 19.04 results in Nautilus, the Desktop Icons extensions, and the ubuntu-desktop meta package to be removed. On Fedora on the other hand, which has more Gnome software installed by default, removing Tracker also wants to remove Gnome Boxes, Documents, Photos and Totem, along with 134 other packages.

The official way of disabling Tracker on Gnome desktops is to go to Settings -> Search, and turn off the switch from the search settings headerbars (top of the window). There are users however, claiming that this does not disable it, so I decided to try it out, and after turning this option off and a system reboot, tracker status claimed it has more than 100000 files in its index, and it's currently indexing files. But you can give this a try if you wish, and see if it has any impact on your system.

[[Edit]] I've updated the article with instructions for disabling (and undoing the changes) Tracker 3, which was released with GNOME 3.38. Note that not all Linux distributions using GNOME 3.38 and newer use Tracker 3 - e.g. Ubuntu 20.10 and 21.04 both use GNOME 3.38 but Tracker 2; Fedora 34 for example, uses GNOME 40 and Tracker 3.

So how to completely disable Tracker, so it no longer indexes any files, and stop having any Tracker process running in the background? You can mask the Tracker systemd services to completely disable it for your current user using this command:

  • For Tracker 2:
systemctl --user mask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service

  • For Tracker 3:
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

After this, reset Tracker:

  • For Tracker 2:
tracker reset --hard

  • For Tracker 3:
tracker3 reset -s -r

And reboot.

If you reboot your system after masking the Tracker services, you should no longer see any Tracker processes running in the background. Or run tracker status (for Tracker3, run tracker3 status) and it should not work, saying that the unit is masked (this only happens if you used both the mask and the Tracker reset commands). You may also run tracker daemon (for Tracker 3, run tracker3 daemon) to check the status of the Tracker daemons (Tracker Store and Tracker Miners) - they should all be listed as disabled / not running:

Tracker daemons disabled

You may get a warning that some of these services do not exist - ignore it. That's because for example on Ubuntu 19.04 there's no tracker-miner-rss.service by default, but there is one on Solus OS and Fedora, which in turn do not have tracker-miner-apps.service.

When masking a systemd service, its unit file is symlinked to /dev/null, making it impossible to load the service, even when some other service tries to load it. This is better than disabling the service, because when disabled, a service may still be started if another service that depends on it is started.

Want to undo this change and enable Tracker back? Use:

  • For Tracker 2:
systemctl --user unmask tracker-store.service tracker-miner-fs.service tracker-miner-rss.service tracker-extract.service tracker-miner-apps.service tracker-writeback.service

  • For Tracker 3:
systemctl --user unmask 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

And reboot your system after this.

partially via r/Ubuntu (u/thegesuser), solution which I used a while back but I forgot to post on Linux Uprising.