291

Spotlight has stopped showing any results for my Applications. I've tried reindexing and removing the index so it rebuilds it. No change. I've tried adding Applications to the Privacy tab and removing it, no change. I tried repairing disk permissions and redoing the above, no change. I've tried removing everything from the index except Applications and then I just get nothing for any search at all (except dictionary entries). I tried adding a symlink in my homedir to Applications and reindexing, but no change.

Any ideas on what to do? I'm running Snow Leopard. This is driving me crazy!

Update: I've noticed that when I start a reindex with sudo mdutil -E / and then immediately do a Spotlight search for an app that the app shows up temporarily until Spotlight gets disabled due to active indexing. After the indexing is done, the app entries go away.

5
  • Just a quick check: have you gone into system preferences and gone into the spotlight tab and customised the search results tab? In that tab you can check which items will be shown in spotlight. If applications are checked, make sure the applications directory is in the right place and send me the location
    – Jamesg
    Sep 1, 2012 at 9:27
  • 1
    yes, it's checked, listed first in the list, and is in /Applications
    – mix
    Sep 1, 2012 at 9:35
  • Could that be related to apple.stackexchange.com/questions/96183/…?
    – pstadler
    Sep 16, 2013 at 13:09
  • In my case rebuilding the Launch Service Database resolved the issues - discussions.apple.com/thread/8176120 Feb 20, 2021 at 9:01
  • Same happened to me. Just a hunch that some over aggressive system/cache cleanup was the cause Apr 16, 2021 at 16:40

7 Answers 7

434

Update Oct 1, 2021

In 10.12 (macOS Sierra) and newer, it appears to be enough to disable and reenable indexing:

sudo mdutil -a -i off
sudo mdutil -a -i on

Original Answer

Loading the metadata plist worked for me:

Turn off spotlight:

sudo mdutil -a -i off

Unload it:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Load It:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Turn on spotlight again:

sudo mdutil -a -i on

Now everything is being reindexed as expected.

18
  • 3
    if after sudo mdutil -a -i on indexing is still disabled please look at this answer Aug 13, 2015 at 3:36
  • 3
    When I try this I get this error Error: Index is already changing state. Please try again in a moment. regardless of how many times I try it / how long I wait.
    – Andrew
    Oct 1, 2016 at 14:53
  • 9
    Here is another solution: discussions.apple.com/thread/7356551?start=0&tstart=0
    – Mackelito
    Mar 15, 2017 at 21:41
  • 57
    I got a message saying Operation not permitted while System Integrity Protection is engaged while unloading, but apparently it's reindexing anyway and worked for me on 10.12.4.
    – Nobu
    May 13, 2017 at 7:56
  • 88
    It worked. I DID NOT need to unload/load. All I did was turn it off and on.
    – mjezzi
    Jun 29, 2017 at 14:48
95

Had this issue and nothing worked until I rebuilt the index using this in the Terminal:

sudo mdutil -E -i on /

As an alternative you can also use a free app called Alfred which has a lot more features.

(I'm not affiliated with Alfred in anyway)

Hope this helps!

8
  • +1 for Alfred...which just works. If it doesn't, it has some very easy-to-use Preferences and Settings interface. Not to mention, workflows. (I, too, am not associated with Alfred, just happier using it than a busted Spotlight). Jan 7, 2017 at 17:16
  • 1
    This is the answer that worked for me when Spotlight stopped indexing my applications. The currently accepted answer did not.
    – inopinatus
    Sep 12, 2017 at 22:12
  • 2
    Just typing sudo mdutil -E / did the trick for me on macOS 10.12.6 (Sierra) Oct 8, 2017 at 18:11
  • When I first tried this, I got an error message about the index being read-only; but after I restarted my computer, this command worked, and fixed my index. Jan 23, 2018 at 8:26
  • 2
    Alfred actually uses the Spotlight index, see no. 3 alfredapp.com/help/troubleshooting/indexing Mar 12, 2018 at 10:23
41

When I tried Anil's solution, I got:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
/System/Library/LaunchDaemons/com.apple.metadata.mds.plist: Operation not permitted while System Integrity Protection is engaged

Instead, I followed these instructions, and it worked:

  1. Go to System Preferences, Select Spotlight
  2. Go to the Privacy tab in the Spotlight system preferences
  3. Click the Plus button
  4. Press Shift-Command-C to reveal your hard drives (if they are not available otherwise), or simply navigate to your hard drive (most likely MacintoshHD)
  5. If you have more than one hard drive, hold the Command key and click your various drives to add them to your selection
  6. Click the “Choose” button to add them to the Privacy list
  7. Ignore the warning.
  8. Remove the hard drive by clicking the minus sign.
  9. Boom, no more sad days.
7
  • This worked for me. I was having trouble with the Slack.app application not being recognized as an application. After performing these steps the Slack app now works just like all my other applications in Spotlight. Jun 5, 2017 at 13:49
  • I had the same problem with Safari, if you can believe it. I am in a highly secure corporate environment, and this is what I was allowed to do, and it worked.
    – Jeff
    Jun 5, 2017 at 14:48
  • Just had this problem with Evernote and this solved it. Thank you @Senseful. Jul 20, 2017 at 3:11
  • This solution worked great! In fact I could not use the other ones because I cannot seem to be able to find the terminal without spotlight :P
    – kenik
    Mar 26, 2018 at 21:57
  • @kenik You can find everything in the Finder app.
    – akashg
    May 11, 2018 at 19:07
8

Since macOS starting 10.15, all user data is on /System/Volumes/Data which is also where the .Spotlight-V100 folder is. To really force Spotlight to rebuild its cache, I've found this needs to be deleted. So I needed to do the following:

sudo mdutil -a -i off /
sudo mdutil -a -i off /System/Volumes/Data
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

sudo rm -Rf /System/Volumes/Data/.Spotlight-V100/

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo mdutil -a -i on /
sudo mdutil -a -i on /System/Volumes/Data
3
  • Finally this was the only thing that helped me. Had this issue since Catalina was released. Please note that I could not perform the launchctl steps nor remove the files from terminal because of System integrity protection. Instead I opened /System/Volumes/Data in Finder, enabled showing hidden files, and moved the Spotlight folder to trash.
    – alain.s
    Nov 20, 2020 at 10:40
  • 1
    I found I did not actually have to delete the .Spotlight-V100 directory. Simply running the two mdutil commands on the /System/Volumes/Data directory fixed the problem. Thanks!
    – jlyonsmith
    Feb 28, 2021 at 18:43
  • In my case, the problem was that I didn't have Spotlight indexing enabled for /System/Volumes/Data at all, so I simply had to re-enable indexing via: sudo mdutil -i on /System/Volumes/Data. Then it started working again.
    – GDP2
    Oct 18, 2022 at 22:31
2

Have you tried removing the spotlight.plist in your user preferences. Similar problem with 10.7.5 and re-indexing wouldn't work until I moved the spotlight.plist to the desktop to be safe and then did a sudo mdutil -E / If that works you can delete the old .plist file.

2

Here's a BASH script to automate the boring stuff based on @AntonioR and @Anil's answers: : https://gist.github.com/Obaied/d8afbbce1b73481fbd0410c0897b6a87

#!/bin/sh
# Reference: https://apple.stackexchange.com/questions/62715/applications-dont-show-up-in-spotlight

sudo mdutil -a -i off
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo mdutil -a -i on /
1

For me, it was as simple as opening terminal (use command + space, then type terminal)

Then simply

sudo mdutil -a -i off

It will ask for you password, enter it and hit enter.

Then

sudo mdutil -a -i on

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .