Download Darik's Boot & Nuke (DBAN). This will wipe all existing data off of the hard drive. If you're still concerned, you can simply replace the hard drive with an inexpensive SSD, which will make the system perform better.  Reinstall Windows 10 using the Media Creation Tool. As long as Windows 10 was successfully activated on that computer in the past, the new install will automatically activate without a key. Otherwise, you will need to reinstall using the original recovery media, then upgrade to 10.  Visit the Dell Support page and enter in the service tag to download any missing drivers. For a 12 year old computer, Windows 10 should be able to detect and install any drivers for devices that were originally part of the system. You should be able to download most of the Dell pre-installed software as well.
I am giving away my Optiplex 790 desktop.  Is there a way to delete all personal data from it but leaving Dell's default manufacturing data and the OS in place? Windows 10 Pro is installed.    I have read that Optiplex desktops built after November 2015 include a feature like that, but the 790 was released in 2011.  Thank you.
Optiplex 790 - remove all personal data