Spotlight is not indexing as it should, how do I refresh my spotlight indexing
How do I index spotlight...?
MacBook Air 13″, macOS 11.6
How do I index spotlight...?
MacBook Air 13″, macOS 11.6
How to rebuild the Spotlight index on your Mac
If searching your Mac doesn’t return expected results, rebuilding the Spotlight index might help.
If still not working...
Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode? Could take 10 minutes.
Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.
Manually Rebuilding Spotlight via Terminal
If the aforementioned Spotlight control panel approach doesn’t spur a reindexation of the drive, you may need to initiate it manually through the command line. Open Terminal and use the following command string to do so:
sudo mdutil -E /
This basically asks for temporary super user status, which is why Terminal may ask you for your password (it may not if you’ve used a sudo command recently or are already logged in as a super user or root. The command asks the unix tool mdutil to reindex the spotlight database for everything on the computer, including external drives, mounted disk images, etc. To re-index only for a specific drive, use the /Volumes path. For example, for an external drive named “MiniMe,” the command would look like this:
sudo mdutil -i on /
Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.
If still need be…
Open Terminal and run each of these one at a time
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network
killall Dock
sudo mdutil -E /
sudo mdutil -i on /
Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.
How to rebuild the Spotlight index on your Mac
If searching your Mac doesn’t return expected results, rebuilding the Spotlight index might help.
If still not working...
Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode? Could take 10 minutes.
Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.
Manually Rebuilding Spotlight via Terminal
If the aforementioned Spotlight control panel approach doesn’t spur a reindexation of the drive, you may need to initiate it manually through the command line. Open Terminal and use the following command string to do so:
sudo mdutil -E /
This basically asks for temporary super user status, which is why Terminal may ask you for your password (it may not if you’ve used a sudo command recently or are already logged in as a super user or root. The command asks the unix tool mdutil to reindex the spotlight database for everything on the computer, including external drives, mounted disk images, etc. To re-index only for a specific drive, use the /Volumes path. For example, for an external drive named “MiniMe,” the command would look like this:
sudo mdutil -i on /
Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.
If still need be…
Open Terminal and run each of these one at a time
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network
killall Dock
sudo mdutil -E /
sudo mdutil -i on /
Rebuilding a drive index can take a long time, so be prepared to wait whether you do it through the System Preference panel or the command line.
Many things can cause Spotlight to misbehave. For instance, it refuses to index a clone — a drive that has been duplicated with a utility such as SuperDuper. To fix the problem, you need to deal with two invisible files on the problem drive. To toggle them visible/invisible type Shift-CMD-period at any time.
Step 1. Delete this file: .metadata_never_index_unless_rootfs. You will see it in the drive’s root (top) level.
Step 2. Edit this file: VolumeConfiguration.plist. You will see it inside the folder named /.Spotlight-V100. Use a text editor (NOT a word processor!) such as BBEdit or TextEdit to replace these lines
<key>Exclusions</key>
<array>
<string>/</string>
</array>
with these lines:
<key>Exclusions</key>
<array/>
<key>Options</key>
Save and close the file.
Step 3. Eject the drive, then remount it. (System reads these files only once, at the time of mounting.)
Performing Step 1 without Step 2 has no effect.
Performing Step 2 without Step 1 has no effect.
To check for success, launch Terminal, and issue this command:
sudo mdutil -a -i on /
It will report which drives have Spotlight enabled and which do not.
👍
Spotlight is not indexing as it should, how do I refresh my spotlight indexing