
Spotlight is the search system built into macOS. It helps you find documents, folders, apps, messages, settings, and other information. If Spotlight shows incomplete results, misses files, or behaves unusually slowly, rebuilding its index can often fix the problem.
Rebuilding the index does not delete your files. It removes Spotlight’s searchable catalog and creates a new one from the existing files on your Mac. The process may take minutes or several hours, depending on how much data you have.
Quick Answer
The safest way to rebuild the Spotlight index is through System Settings:
- Open Apple menu > System Settings.
- Select Siri & Spotlight.
- Scroll down and select Spotlight Privacy.
- Add your Mac’s internal drive to the privacy list.
- Wait a few seconds, then select the drive in the list and click the Remove button.
- Close System Settings and let macOS rebuild the index.
Adding a drive to Spotlight Privacy temporarily prevents Spotlight from searching it. Removing the drive from the list allows indexing again. This process changes Spotlight’s catalog, not the files stored on the drive.
Before You Rebuild Spotlight
Rebuilding the index is generally safe, but keep these points in mind:
- It does not erase, move, or rename your files.
- Search results may be incomplete while indexing is in progress.
- Your Mac may use additional processing power and battery during the rebuild.
- The rebuild can take longer if your Mac has a large drive or many files.
- Keep your Mac connected to power if the process is taking a long time.
- Avoid interrupting the process if possible.
If you have unsaved work open, save it before beginning. The steps below should not normally close applications, but saving your work is a sensible precaution before changing system settings.
Before rebuilding, confirm that Spotlight is actually the problem. Try searching for a file by name with Spotlight. You can also check whether indexing is still in progress by following this guide to check Spotlight indexing status on a Mac.
Method 1: Rebuild the Spotlight Index in System Settings
This is the easiest method for most Mac users because it does not require Terminal commands.
Add the drive to Spotlight Privacy
- Select the Apple menu in the top-left corner of the screen.
- Open System Settings.
- Select Siri & Spotlight in the sidebar.
- Scroll down and select Spotlight Privacy.
- In the Spotlight Privacy window, select the Add button. Depending on your macOS version, this may appear as a plus sign.
- In the file browser, select your Mac’s internal drive. It may be named Macintosh HD, unless you renamed it.
- Select Choose.
The drive now appears in the Spotlight Privacy list. While it is listed there, Spotlight excludes the drive from searches. This temporary exclusion is what allows macOS to discard the current index for that location.
Remove the drive from Spotlight Privacy
- In the Spotlight Privacy list, select the drive you just added.
- Select the Remove button, which may appear as a minus sign.
- Close the Spotlight Privacy window and System Settings.
Once you remove the drive, macOS can index it again. Spotlight should begin creating a new index automatically.
If your Mac does not begin indexing immediately, wait several minutes and search for a file you know is stored on the drive. You may see an indexing progress message in the Spotlight search window, or search results may gradually return as the process continues.
What this method changes
This method changes Spotlight’s exclusion settings temporarily. It does not:
- Delete documents or folders
- Empty the Trash
- Reformat the drive
- Remove applications
- Change file permissions
- Alter the contents of your files
It only tells Spotlight to stop indexing the drive and then allows indexing again.
Method 2: Rebuild Spotlight with Terminal
Terminal provides another way to rebuild the index. This method is useful if the Spotlight Privacy method does not work or if you prefer a direct command.
Warning: Terminal commands can change system behavior. Enter commands exactly as shown, and do not run unrelated commands while troubleshooting. The commands below affect Spotlight indexing; they are not intended to delete personal files.
Rebuild the index for the startup volume
- Open Finder.
- Select Applications in the sidebar.
- Open the Utilities folder.
- Open Terminal.
- Enter this command:
sudo mdutil -E /
- Press Return.
- Enter your Mac user account password if Terminal requests it, then press Return.
The sudo part temporarily gives the command administrator-level permission. The mdutil utility manages Spotlight indexing. The -E option tells Spotlight to erase and rebuild the index. The final / refers to the current startup volume.
When you type your password in Terminal, characters may not appear on screen. This is normal. Type the password carefully and press Return.
Rebuild the index for a specific volume
If you want to rebuild a different connected drive, replace the path with that drive’s name. For example:
sudo mdutil -E "/Volumes/External Drive"
The quotation marks are important when the volume name contains spaces. Replace External Drive with the exact name of your drive.
This command rebuilds the Spotlight index for that volume only. It does not erase the volume or change the files stored on it.
Check whether indexing is enabled
To check the indexing status of the startup volume, enter:
mdutil -s /
This reports whether Spotlight indexing is enabled for that volume. A message indicating that indexing is enabled means Spotlight is allowed to create and maintain an index. It does not necessarily mean the rebuild is finished.
Re-enable indexing if it was disabled
If indexing was turned off, you can enable it with:
sudo mdutil -i on /
Then rebuild the index:
sudo mdutil -E /
The first command enables indexing for the startup volume. The second erases the existing Spotlight index and starts a new one.
Safe reversal
The rebuild command does not make a permanent file change that needs to be reversed. Once the new index is complete, Spotlight returns to normal operation.
If you used the command that enables indexing, the corresponding command to disable it is:
sudo mdutil -i off /
However, disabling indexing is usually not a solution for missing search results. It prevents Spotlight from updating its catalog, so leave indexing enabled unless you have a specific reason to turn it off.
How to Tell Whether the Rebuild Is Working
Spotlight may not display a detailed progress percentage. You can still look for signs that indexing is active:
- Search results are incomplete at first and improve later.
- The Mac may run warmer or use more processor power temporarily.
- Spotlight may display an indexing message.
- Files that were previously missing begin appearing in search results.
- Searching by an exact file name eventually produces the expected result.
The time required depends on the amount of data, the speed of the storage, and other activity on the Mac. Avoid judging the rebuild too quickly. If you continue working during the process, indexing may take longer.
For best results, leave the Mac awake and connected to power. You can continue using it, but heavy file transfers or large software updates may compete with indexing for system resources.
Troubleshooting Spotlight Indexing
Spotlight still cannot find a file
First, confirm that the file exists by opening its folder in Finder. Spotlight cannot find a file that was deleted, moved to an excluded location, or stored on a disconnected drive.
Then check these possibilities:
- Open System Settings > Siri & Spotlight > Spotlight Privacy.
- Make sure the file’s drive or parent folder is not listed.
- If the file is inside a folder listed there, remove that folder from the privacy list.
- Rebuild the index again if necessary.
Also check whether the file type is supported for searchable content. Spotlight may find a file by name without being able to search the text inside every file format.
Only some folders are missing
If most search results work but one folder does not appear, that folder may be excluded from Spotlight.
- Open System Settings.
- Select Siri & Spotlight.
- Select Spotlight Privacy.
- Look for the missing folder or its drive.
- Select it and click the Remove button.
After removing the folder, give Spotlight time to index it. If the folder was never excluded, try adding it to Spotlight Privacy and then removing it. This forces Spotlight to rebuild the index for that location without affecting its contents.
An external drive is not searchable
Make sure the drive is connected, mounted, and visible in Finder. Some external drives may also have permissions, file-system, or connection problems that prevent normal searching.
You can rebuild the index for the external drive with Terminal:
sudo mdutil -E "/Volumes/External Drive"
Replace the path with the drive’s actual name. If the name contains spaces, keep the quotation marks.
If the drive is used with another operating system or has an unusual format, Spotlight behavior may differ. Copying a test file to the drive can help determine whether the issue affects the whole volume or only existing data.
Indexing seems stuck
Try these steps in order:
- Keep the Mac connected to power.
- Close unnecessary applications.
- Restart the Mac.
- Check Spotlight Privacy for excluded drives or folders.
- Run the Terminal rebuild command again:
sudo mdutil -E /
If indexing repeatedly stops, check for low free storage, drive errors, or a problematic folder containing damaged files. A nearly full drive can also cause broader macOS problems.
Search finds apps but not documents
Open System Settings > Siri & Spotlight and review the categories Spotlight is allowed to show. Make sure Documents and other relevant result types are enabled.
You can also use Finder to locate the file directly. If Finder can open the file but Spotlight cannot find it after indexing finishes, the issue may involve the file’s location, permissions, format, or Spotlight’s search settings rather than the file itself.
Spotlight opens with the wrong keyboard shortcut
A shortcut problem is different from an indexing problem. If Spotlight works when opened from the menu but not with the keyboard, review the shortcut in System Settings > Keyboard > Keyboard Shortcuts. You can also learn how to change the Spotlight keyboard shortcut on a Mac.
Frequently Asked Questions
Will rebuilding Spotlight delete my files?
No. Rebuilding removes and recreates Spotlight’s search index. Your files remain in their original locations.
How long does a Spotlight rebuild take?
It depends on the amount of data and the activity on your Mac. A small drive may finish quickly, while a Mac with many files can take much longer. Search results may be incomplete during the process.
Can I use my Mac while Spotlight rebuilds?
Yes. You can generally continue working, but indexing may take longer if the Mac is busy. Keep the Mac connected to power if possible.
Is Terminal required?
No. The Spotlight Privacy method in System Settings is sufficient for most people. Terminal is an alternative when the graphical method does not resolve the problem.
Does rebuilding Spotlight repair missing files?
No. It repairs the search catalog, not the storage device or deleted data. If a file no longer exists, rebuilding Spotlight cannot restore it.
Should I rebuild Spotlight regularly?
Usually not. Rebuild the index when search results are consistently incomplete, incorrect, or missing files that you know exist. Routine rebuilding is unnecessary.
Final Thoughts
Rebuilding the Spotlight index is a safe way to address unreliable Mac searches without deleting personal data. Start with System Settings > Siri & Spotlight > Spotlight Privacy, temporarily add the affected drive, and then remove it. If that does not work, use mdutil in Terminal to rebuild the index directly. Give macOS time to finish before judging the results.