Why does deleting a Mac OS X app leaves its shortcut in the Launchpad?

Whenever I delete an app from the Applications folder, its shortcut stays in the Launchpad. In order to delete it, I have to click on it (a question mark appears), and then drag to the trash can. Is it a bug, or does this mean I am doing something wrong?


Solution 1:

It may be a bug, but I am thinking it may mean your Spotlight index is corrupt.

I just tried deleting Evernote from my Applications folder. After authenticating, it moved it to the trash. I then checked launchpad again, and it was no longer there. Then, when I dragged it back out of the trash and placed back into Applications folder. Relaunched launchpad, and it was there again on the last page. As in, worked as expected here.

Launchpad keeps its own plist of what files there are, etc, and thats why there are some modification tools to allow to you to edit it. But I am assuming they would use spotlight to 'watch' your Applications folder to add new items not through the Mac App Store. I assume Spotlight because its a great tool for the job, installing Lion does a huge spotlight re-index, and they do use spotlight often behind the scenes.

First, the GUI way I have seen online is to do this (I do the command line way below):

  1. In system's preferences -> spotlight -> Privacy add the drive you want to re-index
  2. Quit System's preferences
  3. Logout of your sessions
  4. Login again :-)
  5. In system's preferences -> spotlight -> Privacy remove the drive you want to re-index
  6. Wait.. a faily long time. You should see mdworker and/or mds running

Personally, I have always done it through the command line.

  1. Launch ‘Terminal’ (located in /Applications/Utilities/)
  2. At the command prompt, type this exactly: sudo mdutil -E /
  3. You will be asked for your password, provide it, as this command requires administrator privelages to run
  4. You will receive a confirmation message saying that index will be rebuilt
  5. Wait until index is finished rebuilding, this can take a while depending on the size of your hard drive, amount of files, etc.

While I can't find any documentation online that 100% confirms that Launchpad uses Spotlight for this, this would be the first place I would look for the problem you are having.

Solution 2:

I think that it is expecting you to remove the application directly from LaunchPad. Launchpad obviously reads it's apps list and folder groupings/layouts from some configuration file, and so when you remove an App it hasn't necessarily had a chance to remove that icon and it's associated positioning etc from it's config.

It would be interesting to see how often it checks for removed files etc, maybe it's a one-time boot or login process (perhaps you can test this by removing (or moving) an app and seeing if the icon remains after effectively restarting the LaunchPad process.

The best workaround, is to remove directly in LaunchPad. This should remove the App from /Applications, and remove it fully from the LaunchPad configuration.