Read an App's Preferences with defaults

Dump every stored key of a preference domain to see what an app actually saved.

macOSdeveloperdefaultscliLow risk
Run `defaults read com.apple.Safari` to print the whole Safari preference domain.

01Command

Command
$ defaults read com.apple.Safari

02What it does

Every `defaults write` you find in a tip should be checked against reality first: `defaults read <domain>` shows the current keys and values, and `defaults read <domain> <key>` narrows to one. The domain is usually the app's bundle identifier, which you can confirm by reading its Info.plist. It's also the quickest way to discover which key a GUI toggle actually flips.

03Risk

RiskLow risk
!Warning: Reading is safe, but never paste `defaults delete`/`write` lines into Terminal without checking the key exists and matters — wrong keys can break an app's settings.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-18 · Category: Developer

06Related solutions