Then boot into twrp 2.7... and install the new twrp 2.8.1 (again from sd card)
Then boot twrp 2.8..1 and wipe-advanced wipe-data-repair or change file system-change file system-EXT4
After this again wipe in new recovery advanced wipe-dalvik-cache-system-data then swipe and install rom/gapps.
I think before all this the device should be rooted.
Maybe somebody could confirm all this because it has been years since i did this.