Enable Spotlight Indexing To Re-Index Your Mac Hard Drive [OS X Tips]



A while back, we wrote up a tip on reindexing the hard drive on your Mac using Terminal. Recently, a Cult of Mac reader emailed us to let us know it wasn’t quite working on his end.

I read your post on using terminal to reindex the hard drive on a mac. Any idea why when the command is executed the terminal displays “Indexing disabled.”?

Mike S

Here’s what he had to do to get it working again.

It turns out that Mike may have disabled Spotlight Indexing at some point, or it was disabled for some other reason. He had to enable, or re-enable, really, the indexing process. To do that, launch Terminal and type or paste in the following command:

sudo mdutil -a -i on

Hit return and then enter your admin password. This will get the indexing working again. Now when you go to re-index spotlight in the future, you won’t get the error that Mike saw, above, and you’ll be able to save a bit of time once the re-indexing has happened.

Via: Mike Hudson Blog

  • Darkswat

    Thanks. Just did this and it works again!

  • Krest

    You can force the reindexing by opening system preferences > spotligt. Then hit the privacy tab and drag&drop your hdd into that window. You will be asked if you really want to disable spotlight for that drive. The moment you hit “yes” the index will be deleted. Then simply remove the hdd from that list and spotlight will start reindexing your drive. (for all those not too comfortable with the terminal)

  • cumik

    Great tips, Thanks. May be help to someone this:
    Spotlight keeps its index files and database in the root of each drive in an invisible directory named:
    If you delete the contents of the directory and reboot, Spotlight re-indexes after the restart but now seems to be a bit more processor efficient, after a heavy initial index – just leave it for a few hours, the linked processes (mds) calm down and it starts to works normally.
    delete .Spotlight-V100 file
    sudo rm -rf /.Spotlight-V100/*
    Restart and let the initial indexing take place then things will be OK.
    Outside of that if you want to disable Spotlight on a non-boot start up drive, launch the Spotlight preference via System Preferences, click on the Privacy Tab, click the ‘+’ sign and add in any drives that you don’t want indexed.