How to hide the Spotlight Search icon from your Mac’s menu bar

Check out these 3 ways to remove the Spotlight Search icon from the top menu bar on your Mac and keep your desktop clutter-free.

Spotlight Search on Mac

If you never use the Spotlight feature on your Mac, or use it only by pressing Command + Space Bar, you may have wondered how to remove its icon. Thankfully, unlike the Control Center icon, it’s easy to remove the Spotlight icon from your computer’s menu bar.

However, note that clicking the Spotlight icon in the macOS Tahoe menu bar directly displays the new Spotlight Search, featuring four icons for App Store, Files, Actions, and Clipboard. If you hide this button, you’ll have to use the keyboard shortcuts or press Command + Space Bar to get to Spotlight and then move the pointer to access these four options.

1. Hide the Spotlight Search icon from System Settings

Open System Settings on your Mac, click Menu Bar in the left sidebar, and uncheck the box for “Spotlight” to remove its icon from the top menu bar.

Spotlight Search unchecked in Mac menu bar settings

If your Mac is running a slightly older version of macOS, go to System SettingsControl Center and scroll to the Menu Bar Only heading. Now, click the drop-down menu next to Spotlight and select Don’t Show in Menu Bar.

Do not show Spotlight in menu bar using the Control Center settings on Mac

2. Drag the Spotlight icon to the desktop to remove it

Hold the Command key on your Mac’s keyboard, running a recent version of macOS. Then, without lifting your hold on the Command key, put the mouse pointer on the Spotlight icon and drag it down to the desktop until you see an X icon. Then you can lift your finger from the mouse as well as the Command key.

Drag the Spotlight icon down to the desktop to remove it from the menu bar

You can also use the above steps to remove most other icons from the menu bar, except for Day, Date, Month & Time, Siri, Control Center, and the menu bar icon for any open app.

3. Use Terminal to remove the Spotlight icon from the menu bar

You can use this method if you’re on an older version of macOS and the above solutions don’t work for you. However, before proceeding, please note that modifying system files can cause problems if done incorrectly. Enter the following commands carefully, and proceed at your own risk.

1) Before you begin, you must disable System Integrity Protection (SIP) on your Mac. The file we’re dealing with is not modifiable without this step. To disable SIP, follow our guide on the subject. If you’re on Mac OS X El Capitan or earlier, this step is not required, as you have no SIP.

2) Once SIP is disabled, open Terminal.

3) At the Terminal command prompt, type the following and hit Enter:

cd /System/Library/CoreServices/Spotlight.app/Contents/MacOS

This moves us into the directory we want to edit.

4) Then enter the following:

sudo cp Spotlight Spotlight.bak

This makes a backup of the file we’re going to edit so that if something goes wrong, we can revert.

5) Enter your password when prompted.

6) Now type ls into Terminal and press Enter. It should print a list of two files.

Spotlight.bak is the backup you created in Step 4.
Spotlight is the file we’re about to edit.

Do not proceed if you cannot see both files, as it means you don’t have the backup file Spotlight.bak to revert to. You must have this file in case you want to revert your changes later.

If you can see both files, proceed to Step 7.

7a) If you’re on OS X 10.11 or macOS 10.12-10.14 (El Capitan through to Mojave), enter the following command in Terminal:

sudo perl -pi -e 's|(\x00\x00\x00\x00\x00\x00\x47\x40\x00\x00\x00\x00\x00\x00)\x42\x40(\x00\x00\x80\x3f\x00\x00\x70\x42)|$1\x00\x00$2|sg' Spotlight

7b) If you’re on OS X 10.10 (Yosemite), enter the following command in Terminal (all on one line):

sudo perl -pi -e 's|(\x48\xb8\x00\x00\x00\x00\x00\x00)\x42\x40(\x48\x89\x47\x10\x48\xB8\x00\x00\x00\x00\x00\x00\x36\x40)|$1\x00\x00$2|sg' Spotlight

This command patches Spotlight to make the icon width zero. This effectively makes the item invisible on your menu bar, without disabling Spotlight itself.

8) Enter the following command into Terminal, and press Enter:

cmp -l Spotlight Spotlight.bak

You should see Terminal print out something similar to this:

248855 0 102
248856 0 100

We’re comparing the two files here. If the command doesn’t print out anything at all, then the process has not worked, and you should follow our process below for reverting the changes we’ve made.

9) Now enter this into Terminal:

sudo codesign -f -s - Spotlight

This signs our new Spotlight is ready for use. If you receive an error here related to missing Command Line Tools and xcrun, install Xcode or run “xcode-select –install” in Terminal, both of which will provide the missing tools for the job.

10) And finally, this:

sudo killall Spotlight

This restarts the Spotlight daemon to make our changes effective.

Your entire Terminal session should look something like mine below:

Hide Spotlight icon in Mac menu bar with Terminal

Spotlight might ask for access to your keychain again; select Always Allow. It may also ask for some other privileges, such as Calendars and Contacts access. Grant or deny those as you see fit. Check the top-right corner of your screen to confirm that the icon is gone. If it’s not, try a reboot.

11) Once you’ve confirmed that it works, re-enable SIP.

That should do it. Spotlight search will still function from the Finder and when summoned with a keyboard shortcut, but will no longer trespass upon your menu bar.

Reverting your changes

If you’re already missing the convenience and charm of Spotlight in your menu bar, we can easily reverse our changes to resuscitate the little fellow.

1) Disable SIP again.

2) Open the Terminal application.

3) At the prompt, enter the following, and press Enter:

cd /System/Library/CoreServices/Spotlight.app/Contents/MacOS

4) Next, enter this:

sudo mv Spotlight.bak Spotlight

5) Enter your password when prompted.

6) Now enter this command:

sudo killall Spotlight

6) Check that the Spotlight icon has returned to the menu bar. If it hasn’t, reboot your machine.

7) Re-enable SIP.

Also, check out: