While you are in TWRP connect your phone to the computer and save all your data files such as photos, WhatsApp message store and whatever you like to keep..
then go for a complete data, cache and system wipe.
download the latest ROM you want to flash from the computer to your phone,
then...