There may be a few complications
If you want to sell your MacBook, it’s considered good practice to reformat the internal storage before reinstalling macOS. That reduces the chances of having any personal data compromised. But what if you can’t remember the password to your Mac’s user account?
Reformatting the internal storage on a Mac with a forgotten password depends on its model, and if you’ve signed into it with an Apple ID or not.
Your Mac May Be Secured With Activation Lock
If you use your MacBook with just an offline user account, you can quickly reformat it in macOS Recovery and set up macOS from scratch even if you’ve forgotten its password.
But if you’ve signed into your Mac with an Apple ID and have Find My Mac turned on, that might complicate things. macOS devices that run on Apple Silicon or contain the Apple T2 Security Chip deploy a feature called Activation Lock that prevents unauthorized access to macOS Recovery.
However, if you own the Mac, you can simply use your Apple ID’s passcode to reset the passcode or bypass Activation Lock. If you bought or received the Mac from someone else, you must ask the person to lift the Activation Lock remotely via iCloud.com. It’s impossible to reformat the Mac otherwise.
Try Lifting the Password Before You Start
Before you start, it’s always a good idea to try and reset the password to your Mac’s user account. That allows you to back up any data on your Mac, as well as sign out from your Apple ID to minimize iCloud-related complications later. If you don’t want to do that and just want to format your Mac quickly, jump ahead to the next section.
Use Your Apple ID Credentials
The first method involves using your Apple ID credentials. Try logging in a total of three times into your Mac’s user account. After the third failed attempt, you should get a prompt asking you to reset the passcode using your Apple ID. Do it.
Use a Different Administrator Account
The second method involves using another administrator account. If you have one on your Mac, sign into it and head over to System Preferences > Users and Groups. Then, pick the user account you want to reset and select Reset Password.
If You Managed to Lift the Password
If you managed to reset the password to your Mac, perform the following actions before formatting your Mac.
Back up data using Time Machine: Connect an external drive and head over to System Preferences > Time Machine to create a complete backup of Mac’s data.
Sign out of iMessage: Open the Messages app and select Messages > Preferences on the menu bar. Then, switch to the iMessage tab, and select Sign Out.
Disable Find My Mac: Go to System Preferences > Apple ID and uncheck the box next to Find My Mac.
Sign out of iCloud: Go to System Preferences > Apple ID > Overview and select Sign Out.
Optional: Erase All Content and Settings
If your MacBook runs on macOS Monterey or later, you have a built-in option that lets you wipe all data and settings before selling it. This is purely optional; you can still format your Mac and reinstall macOS regardless.
To get to it, open the System Preferences app. Then, select System Preferences > Erase All Content and Settings.
How To Enter macOS Recovery
MacBooks running on Apple Silicon and Intel chipsets require different procedures to enter macOS Recovery. The following instructions assume that you haven’t reset the password to your Mac. If you have, simply insert the password whenever it’s needed.
Apple Silicon Macs
1. Shut down your MacBook.
2. Hold down the Power button to turn it back on, but do not let go of it until the Loading startup options message shows up on the screen.
3. On the Startup Options screen, choose Options and select Continue. macOS Recovery will load momentarily.
4. If you’ve signed into your Mac with an Apple ID, select Forgot All Passwords? on the account selection screen. Then, enter your Apple ID password to bypass the Activation Lock.
5. Choose Disk Utility and select Continue.
1. Shut down your MacBook.
2. Turn it back on, but immediately press and hold Command + R. Release once you see the Apple logo. macOS Recovery will show up momentarily.
3. If the Mac consists of an Apple T2 Security chip and you’ve also signed into it with an Apple ID, select Forgot All Passwords? on the account selection screen and insert your Apple ID to proceed.
4. Choose Disk Utility and select Continue.
Formatting Your MacBook
After entering macOS Recovery, you can load Disk Utility to format your MacBook.
1. Select Macintosh HD on the Disk Utility sidebar.
2. Select Erase.
3. Set Format to APFS.
4. Select Erase to format your Macbook.
5. Select Done.
After formatting your MacBook, you can reinstall macOS.
1. Select Disk Utility > Exit Disk Utility on the menu bar.
2. Select Reinstall macOS in macOS Recovery.
3. Select Macintosh HD as the target partition and work your way through the onscreen instructions to reinstall macOS.
Once you’ve finished installing macOS, you can set up your MacBook for personal use and restore backed up data via Time Machine. Or, press Command + Q to leave the setup screen if you plan to sell it.
Reformatting a Mac Without a Password Can Be Complicated
As you just saw, reformatting a MacBook with Activation Lock can be complicated. But as long as you haven’t forgotten your Apple ID, you shouldn’t have trouble resetting your password or accessing macOS Recovery.