How do I factory reset my Samsung TWRP?
In TWRP the default option is a factory reset, which wipes the entire device. Tap the Advanced Wipe button and you can choose the specific partitions to wipe—Dalvik Cache, System and Cache will be needed for most ROMs. Data will wipe your data, and is often needed.