If you want to reset your Xbox One to factory settings, follow these steps:
Press the Xbox (power) button on your controller to open the guide.
Select Profile & system > Settings > System > Console info.
Select Reset Console.
You’ll see three options. For a hard reset, select Reset and remove everything.
If you’d like to troubleshoot the Xbox One without removing your games and apps, click “Reset and keep my games & apps” instead.