Reset syncthing account and configuration on linux(debian13)

I wanted to start from scratch with syncthing on debian 13. I tried uninstalling syncthing and reinstalling it but it was not enough, My account and all my shared folders reappeared as if I did nothing.

I managed to found a solution on my own but really struggled to find it. This is how I proceeded:

warning: you must distinguish “myuser” which is your user(a debian user) from “user” which is a parameter of systemd and enables to start syncthing automatically without opening a session.

#Uninstall syncthing

myuser@debian:~$ sudo apt remove syncthing

#cleaning the files myuser@debian:~$ sudo rm -r /home/myuser1/.local/state/syncthing/ myuser@debian:~$ sudo rm -r /home/myuser2/.local/state/syncthing/ myuser@debian:~$ sudo rm -r /root/.local/state/syncthing/

#Installing myuser@debian:~$ sudo apt install syncthing

#Configure syncthing with the webui

  • start syncthing
  • syncthing web ui

#Making syncthing run automatically without opening a session(acts like a server) using command lines

myuser@debian:~$ systemctl --user enable syncthing.service myuser@debian:~$ sudo systemctl --user enable syncthing.service myuser@debian:~$ sudo loginctl enable-linger myuser

What is it you want to know?

It would be unexpected and dangerous to delete a user’s settings when uninstalling an application / package. That does not happen, although the expectation comes up repeatedly from users.

If you do want to start from scratch, you should remove your user’s configuration, usually located in your home directory under .local/state/syncthing/. Different locations are possible for legacy reasons, check the docs if you don’t find it in this standard place.