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
-
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.
-
Open Terminal.
Press Cmd + Space, type Terminal, and press Enter.Expected result: Terminal opens and shows your prompt.
-
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 userEnter your password when prompted (you won’t see characters while typing).
Expected result: Command completes and returns to the prompt without an error.
-
Restart Finder (optional but helpful), then restart Mac.
Run:killall FinderThen 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:
lsregisterpath 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
- Apple Terminal User Guide — https://support.apple.com/guide/terminal/welcome/mac
- Eclectic Light: What LaunchServices does and how to reset it — https://eclecticlight.co/2020/08/12/what-launchservices-does-and-how-to-reset-it/
- OSXDaily: Rebuild LaunchServices database — https://osxdaily.com/2013/07/21/rebuild-launchservices-database-mac-os-x/
- Apple Support Community reference thread — https://discussions.apple.com/thread/251693034
Related tech tricks
- macOS Quick Note Shortcut: Capture Ideas Instantly Without Leaving Your App
- MacBook Battery Trick: Set a Charge Limit for Better Long-Term Battery Health (macOS Tahoe)
- macOS Workflow Hack: Summarize Any Text in Seconds (No AI Needed)
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.