LOGO

Disable Developer Search Results in Spotlight on Mac - Guide

October 24, 2015
Disable Developer Search Results in Spotlight on Mac - Guide

Removing Unwanted Developer Results from macOS Spotlight

macOS Spotlight search occasionally displays results categorized under "Developer" even after Xcode has been removed from your system. This behavior can occur if Xcode was previously installed on the Mac.

While a simple checkbox exists to disable these results when Xcode is present, this option disappears upon uninstallation. Consequently, irrelevant developer-related search entries persist.

The Problem: Lingering Developer Results

The continued appearance of Developer results can significantly clutter Spotlight’s interface. This is particularly noticeable for users with numerous source code files stored locally.

These unwanted results reduce the efficiency of Spotlight searches, making it harder to locate desired files and applications.

How to Disable Developer Results Without Xcode

It is possible to eliminate these unwanted results even without Xcode currently installed. The process involves utilizing the Terminal application.

Here’s a step-by-step guide to remove the Developer category from Spotlight search:

  • Open the Terminal application (located in /Applications/Utilities/).
  • Execute the following command: defaults write com.apple.spotlight excludeSystemResults -bool YES
  • Restart your Mac or relaunch Finder for the changes to take effect.

Re-enabling System Results

If you wish to restore the display of system-related Spotlight results in the future, you can reverse the process.

To re-enable these results, use the following command in Terminal:

  • Open the Terminal application.
  • Execute the following command: defaults write com.apple.spotlight excludeSystemResults -bool NO
  • Restart your Mac or relaunch Finder.

By following these instructions, users can effectively manage Spotlight search results and eliminate unwanted clutter, even after uninstalling Xcode.

Managing Developer Search Results in Spotlight

For users with Xcode installed, disabling developer-related search results in macOS Spotlight is a straightforward process.

Access the System Preferences by navigating through the Apple menu and selecting "System Preferences." Within this window, locate and click the "Spotlight" icon.

Alternatively, Spotlight itself can be utilized to directly open this preferences pane. Initiate Spotlight with Command+Space, type "Spotlight," choose the corresponding shortcut, and press Enter.

how-to-disable-developer-search-results-in-spotlight-on-a-mac-1.jpg

Within the Spotlight preferences, a list of search result categories will be displayed. Find the "Developer" category within this list.

To prevent Spotlight from displaying developer-specific search results, simply uncheck the box next to the "Developer" category. This action will effectively hide these results from future searches.

how-to-disable-developer-search-results-in-spotlight-on-a-mac-2.jpg

Following this adjustment, Spotlight will no longer include developer-related items in its search results, providing a cleaner and more focused search experience.

A Spotlight Search Anomaly

Users without Xcode installed may not observe the "Developer" category within the Spotlight preferences panel. While Developer-related results will still be displayed in Spotlight searches, a direct option to disable them is unavailable.

This behavior appears to stem from a software defect present in Mac OS X. The issue was identified across both OS X 10.10 Yosemite and 10.11 El Capitan, and potentially affected earlier operating system iterations as well.

Even after Xcode is uninstalled, Spotlight may continue to present Developer search results, presuming the user has a developer profile. However, the "Developer" category in Spotlight preferences is typically only visible when Xcode is actively installed on the system.

Disabling these results becomes problematic when Xcode is not present, as the relevant preference options are hidden from view.

Addressing Spotlight Search Results Without Xcode

A convenient solution exists if you wish to avoid reinstalling Xcode. While reinstalling Xcode is an option, it necessitates keeping the application installed on your system.

Instead, we can configure Spotlight to operate as if Xcode is present. Begin by opening a Terminal window. This can be achieved by pressing Command+Space, typing "Terminal," and then pressing Enter. Alternatively, navigate through Finder to Applications, then Utilities, and finally double-click the Terminal application.

how-to-disable-developer-search-results-in-spotlight-on-a-mac-3.jpg

Within the terminal window, input the following commands, executing each by pressing Enter:

cd /Applications

touch Xcode.app

how-to-disable-developer-search-results-in-spotlight-on-a-mac-4.jpg

These commands create an empty file named Xcode.app within your Applications directory. This file consumes no storage space and has no functional impact.

The newly created file will be visible in your Applications folder, though it cannot be opened or interacted with.

how-to-disable-developer-search-results-in-spotlight-on-a-mac-5.jpg

Reopen the Spotlight pane within System Preferences. The presence of the Xcode.app file will now display the "Developer" checkbox, allowing you to disable it and thus eliminate Developer-related results from Spotlight searches.

how-to-disable-developer-search-results-in-spotlight-on-a-mac-6.jpg

It is important not to delete the empty Xcode.app file. Removing it will cause Spotlight to re-enable Developer searches upon revisiting the preferences panel.

Credit for this effective workaround goes to Sans Comic on Stack Exchange. Their contribution proved essential when we encountered this issue.

Ideally, Apple will address this behavior in a future update. However, until then, users who have previously installed Xcode must maintain an Xcode.app file in their Applications folder to prevent unwanted Developer search results in Spotlight.

#Spotlight#Mac#disable developer results#search results#macOS#Spotlight search