Selling xbox but want to keep digitally downloaded games
Solution 1:
Your games are tied to your xbox live account. When you buy your new Xbox One, you just log in with your account and your games will be available to download again.
Before selling your Xbox though, you should reset it to factory defaults to remove any private information. You can do it by following these steps:
- Open the Settings application
- Scroll down to the System tab
- Select Console info & updates
- Navigate to the Reset console button.
- Select the Reset and remove everything option. This will entirely wipe your console to a factory-fresh state.
source