MacOS – How to undo Terminal tweaks to the computer’s factory settings

command linedefaultsmacospreferences

I've been playing around with Terminal.

I used the following command.

defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO

I'd like to go back to the way the computer was when I first bought it. Is there a command that performs an undo or resets all the settings?

Best Answer

The delete command will remove that setting. However, you would need to know if it existed and was true. What you did was write a false value to a true false setting. If your mac was already false, the command did nothing and there’s nothing to undo.

If the default state is false, deleting it won’t matter either. Here’s how to delete a variable:

defaults delete -g CGFontRenderingFontSmoothingDisabled

All settings would be hard to accomplish. You could erase everything and restore from backup. Or just reinstall the OS. I would focus on just looking at things you have and want to change unless you really have written tons and tons of things and an erase install would be good. Just copy back your documents from backup and reinstall apps if you are worried settings you changed come back from Time Machine or your backup.