Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

My Spotlight index got corrupted, preventing me from searching messages in Mail.app. I added my HD to Spotlight's privacy list to delete the index. I then removed it from the privacy list so Spotlight would reindex the drive from scratch.

I have done this before with no real problem.

However, this time Spotlight appears to be stuck. It's been "Estimating indexing time" for about 6 hours now.

What can/should I do?

share|improve this question
    
possible duplicate of Why does my Spotlight index get corrupted? –  Studer Sep 2 '10 at 19:36
    
Well, I asked that question too, this is a separate problem. Now I can't get Spotlight to index my drive. –  Darren Newton Sep 2 '10 at 21:01
    
Question about the answer (seem to be unable to post a comment though I'm logged in): The "the_name_you_have_identified_before"; is this "MacintoshHD" in the case of the answer? Just want to get this right! Maybe the initial "answerer", or someone who this worked for could answer this question for me. Many thanks. :) –  Drewdavid Nov 7 '12 at 19:34

1 Answer 1

up vote 16 down vote accepted

You can try to temporarily disable Spotlight, removing its files and then reenabling it.

The process to do this involves executing Terminal commands, so please pay attention and triple check each step.

Open a Terminal.app (/Applications/Utilities/Terminal.app) and type:

cd /Volumes
ls -l

Examine the output of that, one should be your “broken” Volume. Once you have it identified, proceed with these steps, all in the Terminal. The first time you execute a command, your password may be required, this is normal.

The output may look like:

lrwxr-xr-x   1 root    admin     1 Sep  2 12:23 MacintoshHD -> /

So the name you’re after is “MacintoshHD”.

Step Number One: Disable Spotlight for your Drive.

sudo mdutil -i off /Volumes/the_name_you_have_identified_before

Step Number Two: Remove the indexes from the Drive.

sudo mdutil -E /Volumes/the_name_you_have_identified_before

Step Number Three: Eliminate all Spotlight Files from the Drive. (two commands)

cd /Volumes/the_name_you_have_identified_before
sudo rm -fr .Spotlight-V100

Be careful with the last command, make sure you type it exactly as it appears.

Step Number Four: Re-enable spotlight in the Drive.

sudo mdutil -i on /Volumes/the_name_you_have_identified_before

Now this should trigger a Spotlight complete re-indexing. You have to be extremely patient with it. Spotlight sometimes appears to be frozen but it’s really indexing. It’s best to leave it overnight and be patient.

share|improve this answer
    
Thanks Martin - its re-indexing now, will let you know how it goes. –  Darren Newton Sep 3 '10 at 0:59
    
I let it run overnight, drive is now fully indexed, thanks! –  Darren Newton Sep 3 '10 at 12:13
    
Glad it worked! Good luck! –  Martín Marconcini Sep 3 '10 at 22:06
    
Worked perfectly. Thanks. –  fmz Jun 27 '12 at 0:47
    
@fmz Good to hear! Spotlight is a crazy one sometimes. –  Martín Marconcini Jun 27 '12 at 2:00

protected by Community Nov 7 '12 at 19:52

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.