This isn't a query, more a short description of a probem and solution for the benefit of anyone searching for something similar.
I recently picked up a Mac Mini at an Apple UK Retail Store that was preinstalled with Mountain Lion. Because I knew there was a chance I might be taking this machine back under the Returns policy, I deliberately avoided downloading iLife or any other software that might put me in breach of the various licensing agreements if I took it back. What I did do was to upgrade OSX to Mavericks which, although free, required the use of my Apple ID.
For reasons I won't go into here the Mac has not solved the problems I thought it would so it's being returned. I decided to wipe the HD and resinstall OSX, at which point I discovered -- as have many others -- that the Mavericks upgrade not only upgrades the OS itself, but also the information on the Recovery partition. Any attempt to resintall the OS from the Recovery partition required my Apple ID, which would leave any future owner's Mavericks installation locked to my Apple account.
There are a lot of threads on these discussion forums detailing workarounds for this problem, but they all seem to involve one of the following:
- Using the original installation media. Not applicable because newer Macs don't come with installation discs, and the Mini doesn't have an optical drive anyway.
- Rolling back to an earlier Time Machine backup. Not applicable in my case since I'd never set up or used Time Machine.
- Creating USB installation media with a Recovery utility. AFAIK this would still leave the resintalled OS tied to the Apple ID of the user who created the media.
The solution was quite simple but doesn't seem to be directly mentioned in many places, so for the sake of anyone stuck in a similar situation here's what you do:
Instead of holding Command-R at boot time to get to the Recovery utilities screen, hold Command-Option-R to get to the Internet Recovery screen.
When you erase and reinstall from this screen it will pull a copy of OSX from Apple's servers that's tied to the machine's unique ID, not the Apple ID of whoever upgraded it. If the Mac was sold with Mountain Lion, Mountain Lion will be the version offered. It takes a long time because it has to download the whole OS from Apple, so a good fast broadband connection is essential. But it also overwrites the information in the Recovery partition, so any subsequent restores using the Command-R menu will also install the earlier OSX and not ask for an Apple ID.
This might seem quite obvious to some seasoned Mac users but after searching in here and elsewhere for quite some time it was certainly not initially obvious to me. Hopefully this may help anyone else in a similar situation who's trying to get their Mac back to factory condition without installation media, and without leaving the next owner with an unlicensed installation tied to the wrong Apple ID.
 in my case the machine is going back to Apple, who will probably re-image the drive anyway. But this would be equally, if not more, relevant if the machine was being sold on privately.