Outcome: You’ll rebuild macOS LaunchServices so broken app-open behavior, wrong default app links, and stale app icons are refreshed.

Who this is for: Mac users on Sonoma/Tahoe who see files opening in the wrong app, duplicate “Open With” entries, or odd launch glitches.

Time required: About 2 minutes, plus a restart.

Quick Answer

Quit open apps, run the lsregister rebuild command in Terminal with sudo, then restart your Mac. This forces macOS to rebuild app registration data used for default app associations and app metadata.

Before you start (prerequisites)

  • macOS Sonoma 14+ or Tahoe 15+
  • Admin account password (for sudo)
  • Terminal app access

Step-by-step: Rebuild LaunchServices cache

  1. Quit active apps.
    Save your work, then close most apps (especially Finder-heavy workflows and apps that handle many file types).

    Expected result: You’re in a clean session with minimal app activity.

  2. Open Terminal.
    Press Cmd + Space, type Terminal, and press Enter.

    Expected result: Terminal opens and shows your prompt.

  3. Run the LaunchServices rebuild command.
    Paste this exact command and press Enter:

    sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

    Enter your password when prompted (you won’t see characters while typing).

    Expected result: Command completes and returns to the prompt without an error.

  4. Restart Finder (optional but helpful), then restart Mac.
    Run:

    killall Finder

    Then restart your Mac from the Apple menu.

    Expected result: After reboot, app/file associations and icon metadata should be refreshed.

Expected result checks

  • “Open With” menu is cleaner (fewer duplicates/stale entries).
  • Files open in the correct default app (after resetting “Open with” once if needed).
  • Previously broken app icon/association behavior is reduced or gone.

Common mistakes

  • Using the wrong command path: lsregister path must be exact.
  • Skipping restart: some cache effects appear only after reboot.
  • Running without sudo: command may fail or not fully apply.
  • Expecting this to fix damaged apps: this repairs registration data, not broken app binaries.

Quick troubleshooting

  • “No such file or directory”: re-copy the command exactly and ensure you’re on supported macOS versions.
  • No visible change: reboot again, then manually set a file’s default app via Get Info → Open with → Change All.
  • One app still misbehaves: reinstall that app and rerun the rebuild command once.
  • Permission denied: confirm you’re using an admin account.

Reference links

Related tech tricks

Next step

If this fixed your defaults, take 60 seconds to lock your top file types (PDF, images, media) to preferred apps using Get Info → Open with → Change All so your workflow stays consistent.