To reset a Nintendo Switch to sell, you must first delete all user data from the system. This can be done by going to System Settings > System > Formatting Options > Delete All User Data. Once this is done, you must then factory reset the system by going to System Settings > System > Reset.