Spotlight is the powerful search engine built directly into macOS (accessed via Command + Space). To ensure it can find any file, email, or contact instantly, a background process called mdworker constantly scans and indexes every single file on your Mac’s hard drive.
If you just transferred a massive folder containing thousands of files to your Mac, the Spotlight indexer will go into overdrive. It can easily consume 90% of your CPU for several hours, causing your Mac’s fans to spin loudly and your laptop battery to drain incredibly fast. If you rarely use Spotlight to search for files, or if you need maximum CPU performance for a heavy video render, you can completely disable the indexing service.
How to Completely Disable Spotlight Indexing on a Mac
You must use a specialized Terminal command to unload the mds (metadata server) daemon that powers Spotlight.
- Open the Finder, go to Applications, open the Utilities folder, and double-click Terminal.
- To forcefully disable the indexing service for your entire primary hard drive, carefully copy and paste the following exact command:
sudo mdutil -i off / - Press Enter.
- Because this modifies a core system service, you will be prompted for your administrator password. Type it (the characters will not appear on screen) and press Enter.
- The terminal should output a message stating:
/: Indexing disabled.
Spotlight is now completely turned off. If you press Command + Space and search for a document, it will not find it. More importantly, the mdworker process will instantly disappear from your Activity Monitor, freeing up your CPU and stopping the battery drain.
If you ever want to turn Spotlight back on, simply open the Terminal again and run the inverse command: sudo mdutil -i on /. Your Mac will spend the next few hours rebuilding the index from scratch.