Is there a way to reset macOS to factory settings (but without lost of my personal files, such as documents and music, in my home directory)?
There is an article about how to reinstall macOS: How to reinstall macOS - Apple Support, but it seems it doesn’t reset macOS settings to factory ones.
If you back up your music and files, wipe the hard drive, and install fresh, you will have all the settings reset. Then move your personal files back (or download from iCloud).
If you have an Apple Silicon Mac I know of two ways to “reset macOS”. I recently tried the first then used the second to solve an iCloud Drive problem
- The first is found under System Settings /General/Transfer or Reset.
- The second is the one you listed.
The first will erase all your files and settings then, if you are running Sonoma, result in a Mac running Sonoma which is ready for you to setup as you did when new. At this point you will need to restore all your files from your backup.
The second method will erase everything then download from the internet, the version of macOS that your Mac had installed when purchased. After installation finishes you will also have to set up your Mac again and restore your files.
I recommend that you make sure you have all your files backed up. This is especially important if you use the “Optimize Mac Storage” setting. I also made a list of all my installed apps and made note of many of my settings.