2

I was cloning someone's drive, it was named Macintosh HD, just like my my own. Eventually it showed up in Spotlight as Macintosh HD 1.

Spotlight showing missing disconnected external drive

Now when I search for apps and such I always hit its applications. At least nothing happens, since the drive has been removed and no longer exists.

How can I get Spotlight to stop showing me results for it?

I've tried reindexing with the following commands but it only applies to mounted devices:

sudo mdutil -a -i off
sudo mdutil -a -i on
2
  • @user3439894 Cool, I didn't know you could skip spelling full paths like that. I'll try it out! Thanks Aug 19, 2017 at 5:48
  • @user3439894 This worked! Would mind making an answer? Aug 19, 2017 at 6:36

1 Answer 1

2

Just turning off|on Spotlight indexing using sudo mdutil -i off|on, doesn't mean the metadata stores are cleaned up and or rebuilt. Here's what I'd do...

First delete the Spotlight metadata stores using sudo mdutil -E / and wait for the prompt to return. What actually happens is indexing is temporarily turned off, the metadata stores are deleted and indexing turned back on.

Then run sudo -k to terminate the sudo session.

Next I'd rebuild the Launch Services Database, using:

/S*/L*/F*/C*/F*/L*/S*/lsregister -kill -r -domain local -domain system -domain user

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .