Purge old router settings

Is there a way to clear the old router settings from octoprint? I switched to a different wi-fi router to have octo on its own wi-fi. It radomly switches back to the first one after a reboot.

i have reentered the info in octopi-wpa-supplicant.txt twice and have gone through raspi-config twice also. Tonight I just turned off the router I didnt want it to connect to and rebooted the raspi.

I am running Octoprint 1.3.8 on OctoPi 0.15.0 on a Raspberry Pi 3 B

The wifi settings from the wpa_supplicant.txt file are stored under /etc/wpa_supplicant/wpa_supplicant.conf
You will need to edit that on the pi and remove the unwanted sections. Since the router you don't want it to connect to, it will be the first entry that was made in the file, so the first it tries to connect to.

Found and edited. Thank you for the help.

Which - just for the record - on OctoPi should be a symlink to /boot/octopi-wpa-supplicant.txt and if not something broke.

/boot/octopi-wpa-supplicant.txt is where I made the change in the beginning. /etc/wpa_supplicant/wpa_supplicant.conf had both entries in it. The old settings were first in the list

There must be another place it is held it switched again tonight.

Not on OctoPi. I don't know though if they changed something again on Raspbian (which OctoPi is based on) that might cause such behaviour. Or if you maybe not only used the txt file to configure wifi but also brought in some other config tools into the mix (NetworkManager, wicd, ...) that might be interfering with how things are supposed to run.