Ubuntu – How to reset all GSettings key to their default values

command linegsettings

I want to reset all keys in the GSettings to their default values; preferably using a single command, or a simple bash script. How can I get that done?

Best Answer

Generally you can reset one key to its default value with

gsettings reset SCHEMA [:PATH]  KEY

So you might use a bash script to do for all available keys.
Something like (pseudocode):

for i in /dir/of/keys
do
    gsettings reset <key-path>
done

Look at its man-page for more information: man gsettings