Did you buy a used Mac or inherited one from a friend or relative who didn’t write down the password? Don’t worry – you can use the Mac after resetting it, but the data will be lost.
You may also have a Mac that you want to sell, in which case you’ll want to reset the device to give it a clean boot. Apple makes this process very easy if you have a Mac with a T1, T2 or an M-series chip, see: Erasing a MacBook or Mac, but you need a password to do this. We’re here to help if you don’t know that password.
Resetting a Mac without the password will delete everything stored on the machine, but if you’re eager to go back to the beginning with your device, the process is easier than you might think.
In this article, we will show you how to work around this problem and restore Mac to factory settings even if you don’t have the password.
Recover the password if you can
Foundry
Before you erase your device, find out if it contains data you need, especially files that you haven’t backed up.
If this is the case, consider recovering the password instead of resetting the device. We have a tutorial on how to recover a forgotten Mac password for this.
Create a bootable macOS installer in case you need it

Foundry
Before you begin this process, you may later find that you need a USB-C drive to boot macOS if, once the recovery process starts, you don’t have internet access on the affected Mac.
We have a how-to guide on how to reinstall macOS on a Mac that should help with this.
Boot into Recovery

Foundry
Whether you need to wipe your Mac to pass it on to a new user, or because you forgot the password, you should boot into recovery mode. We’ll cover how to use Mac Recovery Mode in a separate article, but we’ll quickly go through the process here:
The method depends on whether you have an Intel-powered Mac or a Mac with an Apple M-series chip.
On an M-series Mac:
- Turn off the Mac.
- Press the power button and keep it pressed.
- Eventually the Apple logo will appear with text below it indicating that continuing to hold the power button will allow you to access boot options. Keep pressing that button.
- Eventually you will be able to select Options > Continue and this will open Recovery, as in the image below (excuse the quality if it is not possible to take a screenshot!)
On an Intel Mac:
- Turn off the Mac.
- Turn it back on while holding down the Command and R keys at the same time until you see the Apple logo or hear a chime. At this point, release the keys.
- The macOS Utilities screen shows a series of options.
Erase the Mac

Foundry
This is where you erase everything on the Mac, so if you’re not sure what to do, you can try Target Disk Mode, now renamed Mac Disk Sharing, so you can copy files. We cover how to do that here: How to share a Mac’s drive with another Mac, although you may still need a password.
Assuming you’re okay to go ahead and uninstall, follow these steps:
- Click Disk Utility and continue.
- Once in the Disk Utility app, your drives will all be listed in the left column.
- Select the internal drive, traditionally called Macintosh HD. You must select the parent drive, as opposed to any aliases below it – see the screenshot for a clearer example.
- With the drive highlighted, click Erase.
- Name your drive in the pop-up window.
- The Format and Scheme drop-down list should be set to Mac OS Extended (Journaled) and GUID Partition Map, respectively.
- Click Clear.
Reinstall the operating system

Foundry
Erasing the disk may take a few minutes, but when it’s done, go back to the macOS Utilities menu and select Reinstall macOS. We’ll go through how to reinstall macOS separately, but we’ll explain the steps below.
You must now reinstall macOS through Recovery. Again, the process depends on whether you have an Intel-based Mac or an Apple-silicone Mac (an M1, M2, or newer).
You should be able to install macOS over the Internet, but you may prefer to use the USB drive you prepared earlier with the macOS installer (which may be faster).
- Select Reinstall macOS in Disk Utilities.
- Click Continue.
- If necessary, enter your Apple ID and wait while macOS is reinstalled.
If your Mac won’t connect to the Internet to download macOS, click the Wi-Fi menu in the top-right corner of the screen, select the Wi-Fi network, and enter your Wi-Fi password. If that still doesn’t work, use the USB boot drive.
Once macOS is installed, check out our list of the best free Mac apps to get the most out of your new (old) machine.
Do you want to change the username on your Mac? Here’s how to do that.
Donated your own Mac, but want to use macOS on a PC? Be sure to check out our guide to installing macOS on a PC (aka a Hackintosh).
For more ways to improve your device, read our guide How to speed up a slow Mac, plus here: How to find a password on a Mac.