7

Over time, I've made many tweaks to my OS using defaults write, for example:

defaults write NSGlobalDomain KeyRepeat -int 0
defaults write NSGlobalDomain AppleShowScrollBars -string "Always"

and so on.

How can I generate a list of all the non-factory settings I've overridden?

  • You could try checking bash history with this command history | grep defaults\ write – JBis Apr 12 '18 at 21:34
  • @Josh bash history won’t go back 2 years lol – Mark Richman Apr 12 '18 at 23:14
  • Excellent question about history of modification! – dan Apr 13 '18 at 11:38
  • For what it's worth, I created a OneNote page (you could use any text editor) with all the changes that I made to my system. It serves two purposes - 1) I can easily reference what I did for diagnostic purposes and 2) I can copy/paste commands if/when I set up a new system. – Allan Apr 13 '18 at 13:53
3

It's not possible to distinguish changes made by you with defaults versus changing the setting using the GUI equivalent preference if one exists, since both perform writes to the property list files in the same way.

Theoretically, the default value shouldn't be written to preference files. Therefore, the only values in ~/Library/Preferences property list files should be ones overridden by you. You will have to investigate these files for the preferences you're using.

Create a new user account and open the software you use without making any changes. Diff the contents of ~/Library/Preferences from this user account with your normal user account, such as with Kaleidoscope, to identify changes made to preferences.

  • Just a thought but depending on how much you use Terminal.app it keeps a history that you can scroll back through by pressing up arrow in terminal or just entering "history" to view the history. Not exactly what you are looking for but perhaps a start... – Steve Chambers Apr 12 '18 at 21:09
  • 2
    @SteveChambers I live in the terminal and it won’t go back 2 years – Mark Richman Apr 12 '18 at 23:15
1

If you have enough spare space on your disk or an external disk, I suggest you to install the same version of MacOS you are running now on this spare disk space as a "configuration reference". Bring this MacOS "configuration reference" to the same upgrade level as your MacOS version you have modified (for my example, let's say you are running Yosemite version 10.10.5).

Then run:

defaults read >/tmp/defaults_MacOS_10.10.5.orig

on your MacOS "configuration reference", and run:

defaults read >/tmp/defaults_MacOS_10.10.5.modified

on the MacOS you have modified.

Bring the 1st file onto your working MacOS, and compare them with diff:

diff defaults_MacOS_10.10.5.{orig,modified} | more

Beware, for some preferences, the content might be huge but not really useful (like windows coordinates).

Next you will have to navigate through the differences found, and create in a personnal text file, comments to explain why this default was modified. A sort of documented history of your working MacOS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .