From android 5 to android 6 you need to make 1st,
1. factory reset from TWRP (wipe > advance wipe > cache + data + dalvik cache),
but if you see red error in this wipe step, then you need to make:
2. format data (wipe > format data > yes > OK > back to TWRP home > reboot > recovery)
And after...