If you still have the file Install OS X Mavericks, you could boot the old machine into Target Disk mode (of course attached to the new iMac, via a Firewire 800 cable), then use Disk Utility to completely wipe everything off the hard drive in the old machine. Then, after making a copy of the Install OS X Mavericks file in another directory on the new iMac, launch the original Install OS X Mavericks file on the new iMac, choose the hard drive on the old one, and then run the installer. After it's done, you can apply the most recent Combo Updater, 10.9.5 (just came out yesterday). That will get the old machine ready with the latest version of Mavericks on it, and all the other stuff you had there before gone. You could even install the latest version of Safari on the old machine. It came out today, version 7.1. The OS 10.9.5 updater (Combo or not) installs version 7.0.6 of Safari.