Last active
April 26, 2026 13:37
-
-
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run in a dedicated directory. Lists all settings plist files, converts the | |
| # list to newline-separated, and writes each to a plist file. | |
| defaults domains | tr ',' '\n' | xargs -I '{}' defaults export '{}' '{}'.plist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run in the directory containing your plist files from the export.sh script. | |
| # Lists the exported plist files, removes the ".plist" extension, and imports | |
| # each into system/app settings. | |
| ls *.plist | sed 's/\.plist$//' | xargs -I '{}' defaults import '{}' '{}'.plist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment