Where is Spotlight index stored and how to check its size in macOS 10.12 Sierra?

Where is Spotlight index stored (in both Mac booting disk and Mac Time Machine disk) and how to check its size in macOS 10.12 Sierra? Thanks.

iMac with Retina 5K display, macOS Sierra (10.12.6), Booting from internal Apple SSD 2TB

Posted on Feb 10, 2018 11:53 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 10, 2018 7:55 PM

It is at the root of your hard drive in .Spotlight-V100 folder.

Use this in Terminal:

sudo du -hcd 1 /.Spotlight-V100/

You must be an admin user to run sudo. It will ask for your password, but when you type it will not echo anything to the screen. Just type the password and hit return.

Just copy and paste the command.

It uses substitute user do to elevate your privileges in order to read the Spotlight directory. It uses disk usage (du) to determine the size. The options are h for human readable output, c for grand total, and d for depth of one directory deep.

10 replies
Question marked as Top-ranking reply

Feb 10, 2018 7:55 PM in response to ApMaX

It is at the root of your hard drive in .Spotlight-V100 folder.

Use this in Terminal:

sudo du -hcd 1 /.Spotlight-V100/

You must be an admin user to run sudo. It will ask for your password, but when you type it will not echo anything to the screen. Just type the password and hit return.

Just copy and paste the command.

It uses substitute user do to elevate your privileges in order to read the Spotlight directory. It uses disk usage (du) to determine the size. The options are h for human readable output, c for grand total, and d for depth of one directory deep.

Feb 12, 2018 2:33 PM in response to Barney-15E

Thanks. I rebuilt the Spotlight index as you said. Then, executing in Terminal

sudo du -hcd 1 /Volumes/Name of disk/.Spotlight-V100

did not work, since the disk name contained spaces: "No such file or directory".


But worked if the name of the disk was written between single quotation marks:


Last login: Mon Feb 12 23:25:17 on ttys000

[Mac:~] user% sudo du -hcd 1 /Volumes/'Name of disk with spaces betwen single quotation marks'/.Spotlight-V100

Password:

4.0K /Volumes/Name of disk with spaces betwen single quotation marks/.Spotlight-V100/Store-V1

28G /Volumes/Name of disk with spaces betwen single quotation marks/.Spotlight-V100/Store-V2

28G /Volumes/Name of disk with spaces betwen single quotation marks/.Spotlight-V100

28G total

[Mac:~] user %


So, the 80 GB Spotlight index has been reduced to 28 GB, which I guess is normal.

Feb 11, 2018 1:40 AM in response to Eau Rouge

TO ADMINS: when trying to reply to the post above, I got:

Your content could not be saved. Please try again in a few moments. Click here to refresh this page.

Yet, that was a misleading and utterly wrong message, since the reason was that the editing time had expired. It would be good if a correct message was issued, and mainly if there is no expiration time for editing. Thanks


Thanks, but doing it starts showing sizes of all items in disk, which are thousands and thus may take hours! So, I aborted it with "Command ." (no quotes).


I have found that the culprit for showing "Command not found" is that when the command is copied from this forum (message by Barney-15E; not message by Eau Rouge, which pastes OK) using Safari 11.0.3 (12604.5.6.1.1) on macOS 10.12.6 (16G1114), spaces are converted into non-breaking spaces (as the ones generated with Option space and can be seen on Microsoft Word selecting "Preferences - View - Show Non-Printing Characters". After changing them by standard spaces, the command (with or without slash at end)

sudo du -hcd 1 /.Spotlight-V100/

or

sudo du -hcd 1 /.Spotlight-V100

shows:


Last login: Sun Feb 11 09:45:09 on ttys000

[Mac:~] user% sudo du -hcd 1 /.Spotlight-V100

Password:

4.0K /.Spotlight-V100/Store-V1

80G /.Spotlight-V100/Store-V2

80G /.Spotlight-V100

80G total

[Mac:~] user%


I understand that it means that Spotlight index file of booting disk takes 80 GB. Is that correct? On the other hand, as indicated above, how to know the size of such Spotlight index file of Time Machine disk (not the booting disk). Thanks again for all.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Where is Spotlight index stored and how to check its size in macOS 10.12 Sierra?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.