Reset napari GUI default settings between runs


So this may be a trivial question but I couldn’t find the answer anywhere: I noticed that napari tends to save the GUI window configuration across runs. For instance, if I close the “Layer Controls” panel in one run, it will still be closed if I close napari and run my script again. And actually, even if I restart my terminal, it will still be closed whenever I would launch a new run. So I guess the state of the GUI is stored in an actual file on the disk.

I know I can toggle the panels visibility from the menu bar, but how can I get the default configuration for the GUI everytime? I’m actually trying to code a plugin that modify the GUI and I would like to start from a fresh (default) one everytime.


Ha, I knew this would come back to bite us. :joy:

If you want to always clear all your settings, you can add the following to your script:

from napari.utils.settings import SETTINGS


For window geometry (which as far as I can tell includes which panels are active), we actually have a setting about whether to persist that particular thing:

Untick that box and window geometry will not be saved in future instances. (To access the preferences, use Ctrl+, (Windows/Linux) or Cmd+, (macOS).)

1 Like

Thanks! That solved all my problems :slight_smile: