macOS tricks
Topics: macOS
This note collects macOS troubleshooting tips, including Launch Services, quarantine, backups, and hardware resets.
Rebuild “Open with…” menu
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user
Clearing quarantine for an app
sudo xattr -dr com.apple.quarantine /Applications/AppName.app
Source: Clearing Quarantine for Casks
Purging TimeMachine backups
sudo tmutil delete /Volumes/Time\ Machine/Backups.backupdb/plato/2020-04-24-053617
Reset NVRAM/PRAM
Start the machine holding Cmd+Opt+P+R.
Reset SMC
- Shut down the machine, then unplug the power cord.
- Wait 15s, then plug the power cord back in.
- Wait 5s, then press the power button to turn on the Mac.
Escaping a stuck screensaver
- Press Ctrl+Cmd+Q
- Press Esc
- Login