Back up any files you want to keep
Sign out of all accounts
Deauthorize software and remove licenses if needed
Create a recovery USB or installation media if you may need it later
Open Settings
Go to System
Select Recovery
Choose Reset this PC
Select Remove everything
Choose Local reinstall or Cloud download
Select Change settings if available
Turn on Clean data for a full wipe
Confirm the reset
Wait for the process to finish
If selling or donating, remove the drive or securely erase it if possible
Reinstall the operating system if needed
Verify the PC starts to the setup screen or login screen
