Skip to content

Instantly share code, notes, and snippets.

@stdevPavelmc
Last active April 12, 2022 20:21
Show Gist options
  • Save stdevPavelmc/aad5ee1e6b4e0d868f9b43488a34a70d to your computer and use it in GitHub Desktop.
Save stdevPavelmc/aad5ee1e6b4e0d868f9b43488a34a70d to your computer and use it in GitHub Desktop.
Disable tracker in Gnome 38-4x

Disable tracker in Gnome 38-4x

Tested on Gnome 40.x/41.x/42.x (Ubuntu) but must work on 38.x and grater.

Stop, disable & mask the services in the userspace (all in just one line):

The code is arranged to easy [human] inspection, read it before proceed; be aware that copy & pasting code on the internet is a bad pactice.

Copy the code below and paste it on your terminal + enter, no sudo is needed.

for cmd in stop disable mask; do \
    echo "${cmd} the tracker services..."
    systemctl --user ${cmd} \
        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 2> /dev/null ;\
done ; \
echo "Freeing space by erasing the actual tracker DB..."
tracker3 reset -s -r
echo "Done!"

Explanation

This script does the following:

  • Stop the tracker services.
  • Disable the tracker services.
  • Mask the tracker services (to avoid gnome can start it without your intervention)
  • Reset [like in ERASE] the local collected database to reclaim the space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment