How and why to rebuild Spotlight index on your Mac

In this tutorial, we will show you how to rebuild the Spotlight index on your Mac if Spotlight isn’t working properly or searching doesn’t return the expected results.

Spotlight Search on Mac

Spotlight, a system-wide macOS feature, allows you to find apps, documents, bookmarks, contacts, emails, items from third-party apps, and more from one central place on your Mac.

In order to work properly, Spotlight relies on an indexed database of all the disks and files on your system that you haven’t explicitly excluded from searching. When Spotlight is acting up, searching your Mac may not return the results you’d expect. If that’s your case, then rebuilding the Spotlight index might help fix your problems.

Rebuild Spotlight index on Mac

Follow the steps depending on which macOS version is on your Mac.

On macOS Ventura or later

1) Open System Settings and select Siri & Spotlight.

2) Click Spotlight Privacy from the bottom.

3) Drag the folder or disk that you want to reindex and drop it on the list of locations that Spotlight is prevented from searching. Since our aim is to initiate the reindexing process on the startup volume, drag the system disk icon from the desktop and drop it on the Privacy screen in the System Settings window.

Drag Mac disk to Spotlight Privacy section in System Settings

4) Click OK on the “Are you sure you want to prevent Spotlight from searching in disk name?” popup.

Note that to add a folder or disk to the Privacy tab, you must have ownership permissions for that item.

5) Now remove the disk that you just added by selecting it and then click the minus button (-).

6) Click Done and close System Settings.

Remove added disk from Spotlight Privacy section on Mac

On macOS Monterey and earlier

1) Open System Preferences and click the Spotlight icon.

2) Click the Privacy tab in Spotlight preferences.

3) Drag the folder or disk that you want to reindex over this System Preferences screen. The fundamentals are similar to what we have mentioned under the newer macOS section.

how to rebuild Spotlight index - drag system disk icon

4) Click OK to confirm the operation.

5) Now select the disk and hit the minus button to remove it.

how to rebuild Spotlight index - remove button

6) Close out the System Preferences window.

What happens next?

Adding and removing the startup disk from Spotlight’s Privacy tab, then exiting System Settings or System Preferences, will prompt Spotlight to rescan and reindex the contents of the entire disk.

Depending on disk size/folder size and the files stored on it, this may take anywhere from a few minutes to several hours. Your Mac may feel a little sluggish during the reindexing process.

To see if Spotlight has finished indexing, open Spotlight by pressing Command + Space bar and enter a search query. If Spotlight is indexing, it will say so on the top. Wait a little more until the indexing process has finished.

Indexing message in Spotlight on Mac

Rebuild Spotlight index using Terminal

In order to manually cause a re-indexation of your drive or folder, open the Terminal app, then paste the following command into the Terminal window:

sudo mdutil -i on /

Press Return to execute the command, which will prompt the underlying Spotlight process to begin reindexing the startup volume. Keep in mind that you must provide an administrator password to run this command.

Apple says that excluding the startup disk from Spotlight will prevent the system from notifying you about pending updates to any Mac App Store apps that are installed on the computer.

On a related note: How to exclude specific files, folders, disks, and categories from showing up in Spotlight search results on Mac