referring to: https://android.stackexchange.com/questions/189389/lineageos-upgrade-nightly-to-unofficial

@Taknok:
Did this work for you? I tried to follow the instructions on the Wiki page you mentioned, but it did not work. I always ended up with the error described above.

I tried to run "migration.sh unofficial" from recovery which resulted in an error message:
CANNOT LINK EXECUTABLE "/system/bin/sh": cannot locate symbol "__aeabi_memset" referenced by "/system/bin/sh"...

I run the same script while LineageOS was running:
adb shell sh /data/local/tmp/migration.sh unofficial
Official to unofficial migration
Saving backup as /data/system/packages.xml.bak
Done

But when I go to recovery to flash my own build it still says: Can't install this package on top of incompatible data. Please try another package or run a factory reset

How did you manage to do it?