There is a script somewhere on this community where you can remove a device and add the flows to a new device.
Found it.