How to completely reset tailscale after cloning SD card

Hello,

I have a raspberry pi on which I installed tailscale. This is working as expected.

When I duplicate the system by cloning the SD card, boot the second system, change the hostname and bring the network up and login to tailscale then the new system gets assigned the same IP address in tailscale as the first one. Makes sense as all keys are identical on both SD cards.

My question is: how can I completely ‘reset’ the tailscale installation on the second system so that it gets assigned a new IP address different from the IP address of the first system when I reconnect?

What I already tried:

  • tailscale logout + tailscale up
  • tailscale logout + tailscale up --reset
  • tailscale logout + remove device from admin interface + tailscale up
  • delete the /var/cache/tailscale folder

In some instances I got a new IP address (in line with what is stated in the documentation, after removing the device from the admin interface) but the issue is that also the first devices receives the same new IP address after reconnecting that first system.

There has to be some kind of ‘host identifier’ key that I need to remove in order for tailscale to consider both devices to be different.

How can I ensure that a system running a cloned SD card from an existing raspberry pi gets assigned a separate, new IP address different from the first system in the tailscale network?

Thanks,
Lieven

For later reference: please see the uninstall instructions here.

I’m running into this problem now with Tailscale on Alpine Linux.

I’ve tried:

rm -Rf /var/lib/tailscale
rm -Rf /var/cache/tailscale

The instructions simply say to remove /var/lib/tailscale/tailscaled.state.

I figured it out, it’s some combination of:

  • rm -Rf rm -Rf /run/tailscale
  • service tailscale stop before apk del tailscale