There is no one definitive answer to this question. Depending on your computer's hardware and software, different methods may be necessary to restore your IMAC to factory settings.