Export and Import Preference Domains with defaults
Snapshot an entire app's settings to a plist file, then restore or migrate it later.
01Command
$ defaults export com.apple.dock ~/dock-backup.plist02What it does
Before experimenting with defaults write, exporting the domain gives you an exact rollback file — far safer than remembering individual keys. Export captures every key including ones you didn't know existed, which also makes it ideal for copying a tuned configuration to another Mac. Read the snapshot with `defaults read` or plutil -p, and remember most apps only pick up changes after being restarted.
03Risk
04Undo
$ defaults import com.apple.dock ~/dock-backup.plist && killall Dock05Sources
- macOS defaults — read and write user preferencesEvidence: Documents defaults export, import, read and write subcommands for preference domains.
Last verified: 2026-09-17 · Category: Files & Folders
06Related solutions
Point macOS screen captures at any folder you choose instead of the desktop.
Make Finder display .pdf, .docx, .png and every other extension at all times.
See every local APFS Time Machine snapshot on your startup disk and delete ones you no longer need.