How to stop a file or folder from being indexed in GNOME?

I am running Ubuntu GNOME 15.10 with GNOME 3.18, and I would like to know if I can do any of the following and if so how:

  • Make it so that a folder is not indexed but leave its contents indexable (so that if I search for that folder’s name in my system nothing will come up, but if I search for its contents, that will come up)

  • Make it so that a folder is not indexable and nor is any of its contents (and if it contains sub-folders within it then it should recursively not allow any contents in them to be indexed nor the contents of any sub-sub-folders in the sub-folders etc, nor any of those sub-folders themselves)

  • Make it so that individual files in a folder are not indexable, though not having any impact on other contents nor the parent-folder

So, are any of these variants possible? I believe the indexing program is called Tracker which indexes files and folders and their contents and allows for one to search for them on the system.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

In Ubuntu GNOME 16.04 with GNOME 3.20 there is now such an application called Search and Indexing (or tracker-gui) installed by default (if it is not installed or if you are running a previous version which does not have it pre-installed then it can be installed by running sudo apt-get install tracker-gui) which one can use to highly flexibly change the indexing settings with (I have blacked out some personal information in one of the screenshots):

Indexing tab

Locations tab

Ignored Content tab

Control tab


As can be seen from the above screenshots this covers most of the points in the question.

Solution 2

By default folders with a .trackerignore file are ignored, so it should be enough to do:

touch .trackerignore

in the folder you don’t want to be indexed.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply