how to reset a program to its default state?
in android we can clear application data to reset the application to its default state. does it is possible to reset a program in ubuntu to its default state without uninstalling and reinstalling.
how to reset a program to its default state?
in android we can clear application data to reset the application to its default state. does it is possible to reset a program in ubuntu to its default state without uninstalling and reinstalling.
Where are customized properties stored?
Application settings are usually stored either:
~/.config/application_name
Example:
~/.config/libreoffice
.
) folder in~
.Example:
~/.gimp-2.8
Furthermore, applications can have one or more settings in the
dconf
database (gsettings). A simple way to find out if that is the case is to run in a terminal window:...and play with the settings.
Lastly, (mostly) locally installed applications possibly created a local
.desktop
file. If so, you also need to delete that one to make sure you are starting from scratch.Reset
Th bottom line is to remove these folders, if they exist, and reset the
gsettings
/dconf
values. If you'd like a GUI way to reset thos keys, you can look them up indconf-editor
, and reset them to default.Local settings folder(s) will be re- created on the next time you run the application.
dconf-editor
is not installed by default. To install:Yes, you can. The method would depend on the particular application. You would have to find the configuration folder for that particular application and rename or delete it.
Many programs use use
~/.config/[app name]
. For others, you would have to check with the particular application, or developers to get the folder name.Some examples for instance:
It depends on the type of application and how it handles multiple users. In case of multiple users, there may be one "master" config file, which then gets copied to each user's directory. In certain cases, such as when a user makes a boo-boo or there's a security concern, it's easier to just reinstall the app or the whole OS; sometimes you might just want to try emulate factory reset.
Command-line applications often keep config in
/etc/
. Notable examples of that are/etc/vim/vimrc
and/etc/bash.bashrc
. There may also exist extra folders (often ending with a d letter to signify daemons) for particular settings, for example/etc/logrotate.conf
and/etc/logrotate.d
. Graphical applications often (but not necessarily) use dconf database. Between command-line apps and GUI apps, they may use local files. These may be stored in~/.conf
or just in plain sight in user's home folder.The appropriate "reset" way depends on the app. Some apps have a button for that, others - may require deleting a config file. In case of GUI apps, one could use
dconf
or preferablygsettings
command withreset
for particular setting orreset-recursively
for a range of setitngs. You may need to read documentation on those. And there are graphical front ends for that as Jacob Vlijm mentioned in his answer.As for the case when you can't find what file an app uses, you can look under the hood of an app's behavior; one way is to look at
open
syscalls in viastrace
command. For example:Again, refer to
strace
's manual for a set of advanced features and options that can help investigating app's behavior and open files.