Back up any important files
Sign out of iCloud
Sign out of Messages
Sign out of Music, TV, and other Apple services
Restart the iMac
On Intel iMac: hold Command-R while restarting
On Apple silicon iMac: press and hold the power button until startup options appear
Open Disk Utility
Select the internal drive
Click Erase
Choose APFS or Mac OS Extended if needed
Confirm the erase
Quit Disk Utility
Select Reinstall macOS
Follow the on-screen instructions
Complete setup or shut down the iMac after installation
