Technical professionals. Trusted advisors. Certified expertise.

Spotlight Troubleshooting Via the Terminal

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


Share this page:

Locations


New York

Connecticut
Florida
Louisiana
Chicago

Corporate Headquarters
New York

80 Orville Drive Suite 100
Bohemia, NY 11716
Tel: (866) 518-9672
This email address is being protected from spambots. You need JavaScript enabled to view it.

Connecticut

65 High Ridge Road #510
Stamford, CT 06905
Tel: (866) 518-9672
This email address is being protected from spambots. You need JavaScript enabled to view it.

Florida

3321 SW 194th Terrace
Miramar, FL 33029
Tel: (866) 518-9672
This email address is being protected from spambots. You need JavaScript enabled to view it.

Louisiana

218 Barksdale Drive
Broussard LA 70518
This email address is being protected from spambots. You need JavaScript enabled to view it.

Chicago

4 Knollwood Place
Joliet, IL 60433
This email address is being protected from spambots. You need JavaScript enabled to view it.

London

10 Grosvenor Court
Rayners Road
London SW15 2AX UK

Stay Connected

© Copyright 2023, HCS Technology Group. All Rights Reserved.