Posted on 02-23-2015 08:57 AM
I'm wondering if there is a way to exclude specific applications from Spotlight searches in Yosemite. I'm looking to exclude Apple Mail from coming up and then launching from Spotlight. I can successfully hide it in /Applications, take it out of the dock on start up and also remove it from Launchpad.
However, I cannot get it to be excluded from Spotlight unless I specifically go in to System Preferences > Spotlight and uncheck "Applications" but then that takes away the ability to search for any app through Spotlight. Anyone have any ideas? Any help is appreciated.
Posted on 02-23-2015 09:30 AM
I don't know if there's a way to exclude only certain applications from showing up in Spotlight as opposed to entire folders. Although technically application bundles are folders, the Spotlight settings does not see them as directories to add in.
I just tested programmatically adding in an Exclusion to my Spotlight VolumeConfiguration.plist to add "/Applications/Mail.app" but it neither shows up in the Spotlight System Preferences GUI nor does it stop Mail.app from appearing in Spotlight search results, so it doesn't seem it works for anything other than entire folders.
Just curious, but if you really want to prevent Mail.app from being used, why not just remove the application? Or, compress it into a zip and move the zip into a completely different location, and then delete the original in /Applications/ That would stop it from being used, but still give you the ability to re-instate it by unzipping the file and placing it back into /Applications/
Posted on 02-23-2015 11:15 AM
@mm2270 Thanks. Yea I couldn't figure it out either. I could remove it but just in case it's needed later, I wanted to have it. I could explore the zip idea though, that may work. Good thinking on that.
Posted on 05-11-2015 12:58 PM
From what I have found, if you move the app to a Library folder Spotlight will not find it.
http://osxdaily.com/2012/07/21/hide-anything-from-spotlight-in-mac-os-x-with-the-library-folder/ Link
You do need to re index once for it to not show up.
You can do that with mdutil.
For example I will be moving the Photos.app to a folder in our local admin accounts library folder.
Then reindex spotlight and bam, it is gone to the user.
This way if needed I can simply move it back to the Applications folder.
I am testing my scripts now.
Posted on 05-11-2018 06:50 AM
How are you removing items from the Launchpad?
I cannot get this part to work, think it may have been changed