Back up your data
Sign out of iCloud, iMessage, and FaceTime
Restart the iMac
On Intel iMac: press and hold Command + R during startup
On Apple silicon iMac: press and hold the power button until Startup Options appear
Select Options, then click Continue
Open Disk Utility
Select the internal drive
Click Erase
Choose APFS if prompted
Quit Disk Utility
Select Reinstall macOS
Follow the on-screen instructions
Set up the iMac or shut it down after reinstalling
