This is needed at times, nothing to be afraid of. It’s btw the same way used for One M7, besides erasing the sd card.
Performing a factory reset from settings
- Go to Settings, and then tap Backup & reset.
- Tap Reset phone.
- If you want to delete media, documents, and other data from the phone storage, select Erase all data.
To also delete media and other data from your storage card, select Erase SD card. Tap OK.
Performing a factory reset using hardware buttons
In case you can’t access the settings inside the phone, like you’ve forgotten your unlock pattern etc.
- Press and hold the VOLUME DOWN button, and then press and hold the POWER button.
- Wait for the screen with the three Android images to appear, and then release the POWER and VOLUME DOWN buttons.
- Press VOLUME DOWN to select FACTORY RESET, and then press the POWER button.
It’s very similar (the same I think) way used on One M7 etc.