OK, I purge all, delete old directories ... and keep my old weewx.conf file.
Now I have this error :
Configuration file '/etc/weewx/weewx.conf'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** weewx.conf (Y/I/N/O/D/Z) [default=N] ?
Traceback (most recent call last):
File "/usr/share/weewx/wee_config", line 128, in <module>
main()
File "/usr/share/weewx/wee_config", line 122, in main
config_mgr.run(args, options)
File "/usr/share/weewx/weecfg/config.py", line 125, in run
weecfg.modify_config(config_dict, stn_info, self.logger, options.debug)
File "/usr/share/weewx/weecfg/__init__.py", line 313, in modify_config
config_dict['StdReport']['Defaults']['unit_system'] = stn_info['unit_system']
File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
KeyError: 'Defaults'
dpkg: error processing package weewx (--install):
installed weewx package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (241-7~deb10u9+rpi1) ...
Errors were encountered while processing:
weewx
(...)
YM