These are the basic troubleshooting steps when working with stubborn Spotlight index files. The GUI does not always work and you need to use the Terminal to get the job done. It's always good to repair the permissions on a volume before using these steps.
Disable spotlight on all volumes:
sudo mdutil -a -i off
Enable Spotlight on all volumes:
sudo mdutil -a -i on
Enable Spotlight on a particular volume:
sudo mdutil -i on /
The above example shows the root path. If your using a different volume then use the full path. I.E. /Volumes/Data
Disable Spotlight on a particular volume:
sudo mdutil -i off /
The above example shows the root path. If your using a different volume then use the full path. I.E. /Volumes/Data
Delete the spotlight index file on a volume.
First navigate to the volume that you want to delete the index file on. I.E. /Volumes/Data
Then runls -alhto see a listing of all files at the root of the volume. You should see a file called: .Spotlight-V100
Run this command to delete it:
rm -rf .Spotlight-V100
Then runls -alhagain and you should no longer see the .Spotlight-V100 file.
Create a new spotlight Index file on a volume.
mdutil -i on /
The above example shows the root path. If your using a different volume then use the full path. I.E. /Volumes/Data
Runls -alhand you should see a file named .Spotlight-V100 file.
Find Spotlight Index file size.
Spotlight index files are normally large in size. If you want to check the progress on an index file that's re building, run this command:
sudo du -hsc /.Spot*
You should see something similar to this:
675M /.Spotlight-V100
675M total
If you just rebuilt an index, run this command a few times and the file size should continue to grow.
Show the indexing status of all volumes:
mdutil -as