I like the tracker service in Gnome, which indexes files so that you can easily search for them from the Activity view or the file manager. However, I don’t like tracker-extract, which also indexes the file contents: I use Recoll for such a service, and tracker-extract uses too much CPU (it indexes new or modified files as you create/change them).
In the past, up to Gnome 45, I could disable tracker-extract only with
1 |
systemctl --user mask tracker-extract-3.service |
However, in Gnome 46, that service has gone, and in the Gnome discourse forum, https://discourse.gnome.org/t/can-tracker-extract-be-disabled-in-gnome-46/20782, I got a hint on how to disable it by removing the tracker-extract rules from “/usr/share/tracker3-miners/extract-rules/“.
Things have changed again in Gnome 47 (fortunately, they haven’t changed again in Gnome 48) because the directory is now named “/usr/share/localsearch3/extract-rules/“. Thus, the removal must be done like this:
1 |
sudo rm /usr/share/localsearch3/extract-rules/* |
If you want to keep a backup, you might want to move those files somewhere.
This is the script I’m using:
- it works also in Gnome 46 (with the old directory name)
- it takes a backup before removal
Use it at your own risk:
1 2 3 4 5 6 7 8 |
#!/usr/bin/env bash mkdir -p ~/tmp/extract-rules && ( ([ -d /usr/share/tracker3-miners/extract-rules/ ] && sudo find /usr/share/tracker3-miners/extract-rules/ -name "*.rule" -exec mv {} ~/tmp/extract-rules/ \;) || echo "tracker3-miners does not exist, continuing...") && ( ([ -d /usr/share/localsearch3/extract-rules/ ] && sudo find /usr/share/localsearch3/extract-rules/ -name "*.rule" -exec mv {} ~/tmp/extract-rules/ \;) || echo "localsearch3 does not exist, continuing...") && sudo chown -R ${USER}:${USER} ~/tmp/extract-rules |
That works!
WARNING: as soon as tracker-extract is updated to a new version, those files will show up again, and you’ll have to remove them. Possibly, before logging into Gnome, to avoid that tracker-extract starts eating your CPU.
In the meantime, I also created this issue for Gnome: https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/342.