Skip to content

Instantly share code, notes, and snippets.

@liddiard
Last active April 26, 2026 13:37
Show Gist options
  • Select an option

  • Save liddiard/20bf626a9e834b8b3962cb27b3551633 to your computer and use it in GitHub Desktop.

Select an option

Save liddiard/20bf626a9e834b8b3962cb27b3551633 to your computer and use it in GitHub Desktop.
Back up and restore macOS system and app settings ("defaults"). Note that there are several caveats with this approach, including but not limited to: Not all apps' preferences are managed through `defaults`, App Store-installed apps may not appear here, and some domains may be write-protected.
# Run in a dedicated directory. 1-liner to list all settings plist files,
# convert the list to newline-separated, and write each to a plist file.
defaults domains | tr ',' '\n' | xargs -I '{}' defaults export '{}' '{}'.plist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment