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

  1. Shut down the machine, then unplug the power cord.
  2. Wait 15s, then plug the power cord back in.
  3. Wait 5s, then press the power button to turn on the Mac.

Escaping a stuck screensaver

  1. Press Ctrl+Cmd+Q
  2. Press Esc
  3. Login