TWRP custom recovery
Backup (optional but recommended)
+60% charged battery
Boot your device into TWRP recovery.
Select “Wipe” from the main menu of the TWRP recovery and then select “Swipe to factory reset” option on the bottom of the screen. This step will reset the device as it is shipped from the factory.
Go back to TWRP recovery’s main menu, tap on “Install” and select the LineageOS ROM .zip file.
Once you have selected the .zip file, select “Swipe to confirm Flash” option at the bottom of the screen, to start the process of installing the Lineage OS custom ROM. This will take some time so be patient.
Once the ROM is installed successfully, you must repeat the process already with twrp .zip recovery file.
Once the installation is finished you will get a “Wipe Cache/Dalvik” option. Select it and perform “Swipe to clean” at the bottom of the screen.
Once you have finished wiping the Cache and Dalvik cache, press the “Back” button on the screen and then select “Reboot System” button.