If you are considering selling your Apple Mac or need to reinstall the operating system, perhaps when installing a replacement drive or SSD. Here is a guide to do so.
All Intel Macs from Lion (10.7) have a recovery system on the computer, for repairing and reinstalling the current operating system from the hard drive, and an Internet recovery system that enables the Mac to install from the Internet if the hard drive is corrupted or you have a blank drive.
You need to restart your computer and hold down Command + R for recovery menu or Command + Option + R (on a Windows keyboard connected to a Mac, such as a Mini, the Command is the Windows key and Option is the Alt key)
PowerMac G series
The G3 series were released in 1998 with something that differentiates them from older Macs, they had USB ports and you can start your computer from the USB port via a memory stick.
Unlike the Intel Macs, the PPC Macs do not have a recovery system on the hard drive, so you need to boot them either from a memory stick or from an installation CD or DVD. Hold down the Option key when you turn the computer on to boot from memory stick or hold down C for the CD or DVD.
Disk Utility is Apple’s Swiss Army knife of disk tools. You can repair drives; change partitions and erase a partition or drive from this tool.
Click on Disk Utility, then your Mac’s hard drive on the left hand side, then click Erase. You will be asked what type of drive partition you want: HFS+ Journalled or APFS (if you have High Sierra, Mojave or Catalina, and a solid state drive)
Actually, the wording varies between versions as Apple have changed what they call their operating system a few times over the years. Depending on the version, this might say OS X or macOS.
Once you click Continue, you will be asked to click on the drive you wish to install macOS onto, follow the setup steps and you will have a clean install of your Mac
The process for every Apple Mac is the same, you boot from installation media, prepare the drive with Disk Utility, then install the operating system and you have a clean installation.