The fastest way to reset a forgotten password
If you have forgotten your MacBook Air password, the fastest route depends on whether you set up recovery options before you locked yourself out. If you did, you can reset it yourself in about 10 minutes using your Apple ID or a recovery key. If you did not, you will need to use macOS Recovery Mode, which takes longer but works on any Mac.
The method you use also depends on which version of macOS you are running. Newer versions (Monterey and later) handle password resets differently than older ones. Before you start, restart your Mac and hold down Command + R during startup to enter Recovery Mode — this is the gateway to most reset paths.
Key Takeaways
- If you remember your Apple ID and password, you can reset your login password from Recovery Mode in about 10 minutes without losing any files.
- A recovery key — a 28-character code you may have saved when you first set up your Mac — lets you reset your password without needing your Apple ID.
- If you have no recovery options set up, you will need to erase your Mac and reinstall macOS, which deletes all your files unless you have a Time Machine backup.
- Resetting your password does not require you to visit an Apple Store or contact Apple Support, though both can help if you are stuck.
Reset using your Apple ID in Recovery Mode
This is the most common path. Restart your Mac and hold Command + R as it boots. You will see the macOS Utilities window. Click Utilities in the menu bar, then select Reset Password.
A window will open asking which user account you want to reset. Select your account, then click Next. You will be asked to enter your Apple ID and password — use the same Apple ID you linked to your Mac when you first set it up. If you have forgotten that password too, you can reset it at iforgot.apple.com before you start this process.
After you enter your Apple ID credentials, macOS will let you create a new login password. Type it twice to confirm, then click Reset Password. You can now restart your Mac and log in with your new password. Your files remain untouched.
Reset using a recovery key if you have one
When you first enabled two-factor authentication on your Apple ID, Apple gave you a recovery key — a 28-character code that looks like XXXX-XXXX-XXXX-XXXX-XXXX-XXXX. If you saved this code in a safe place, you can use it to reset your password without needing to remember your Apple ID password.
Enter Recovery Mode the same way: restart and hold Command + R. Go to Utilities > Reset Password, select your account, and click Next. Instead of entering your Apple ID password, look for a link or button that says Don't have access to your Apple ID? or Use recovery key. Click it and enter your 28-character recovery key.
After you enter the key, you will be able to set a new password. This method works even if you cannot access your Apple ID account from another device.
What to do if you have no recovery options
If you did not set up two-factor authentication, did not link an Apple ID to your Mac, or cannot remember either one, you will need to erase your Mac and reinstall macOS. This deletes all your files, so only choose this path if you have a Time Machine backup or if you do not need the files on the Mac.
Enter Recovery Mode (Command + R during startup). Click Utilities in the menu bar and select Disk Utility. In the left sidebar, select your main drive (usually called Macintosh HD). Click the Erase button at the top, confirm the name and format, and click Erase again.
After the drive is erased, close Disk Utility. You will be back at the macOS Utilities window. Click Reinstall macOS and follow the prompts. Your Mac will read and install a fresh copy of macOS. When setup is complete, you can create a new login password from scratch.
Restore from a Time Machine backup after erasing
If you erased your Mac but have a Time Machine backup, you can restore your files after macOS reinstalls. During the setup process after reinstalling macOS, you will see an option to Transfer Information Now. Select From a Mac, Time Machine backup, or startup disk.
Connect your Time Machine backup drive (or the external drive where you saved it) and select it from the list. Choose the backup date you want to restore from — usually the most recent one. Your Mac will copy your files, applications, and settings back onto the drive. This process can take several hours depending on how much data you have.
When restoration is complete, you will have your files back and a new login password that you just created. Your old password will not work anymore.
Why you should set up recovery options now
After you reset your password and regain access to your Mac, take 10 minutes to set up recovery options so you never face this situation again. Go to System Settings (or System Preferences on older macOS versions), click General, then Login Options. Make sure your Apple ID is linked to your user account.
If you have not already, enable two-factor authentication on your Apple ID at appleid.apple.com. When you do, Apple will give you a recovery key. Write it down or save it in a password manager — not in a note on your Mac, because you will not be able to access your Mac if you forget your password. Store it somewhere you can reach from another device.
When to contact Apple Support
If you have tried Recovery Mode and it is not working, or if you are seeing error messages you do not recognize, Apple Support can help. You can reach them at support.apple.com or by calling 1-800-MY-APPLE. They can walk you through the process or, in rare cases, help you verify your identity if your recovery options are not available.
If your Mac is still under warranty or you have AppleCare+, support is included. If not, phone support is free for password resets. You may also visit an Apple Store in person, though calling ahead to schedule an appointment is faster than walking in.
Frequently Asked Questions
Will resetting my password delete my files?
No, if you use Recovery Mode and your Apple ID or recovery key, your files stay on your Mac. Only if you erase your drive and reinstall macOS will you lose files — and only if you do not have a Time Machine backup to restore from.
What if I do not remember my Apple ID email address?
You can look it up at iforgot.apple.com by entering your phone number or a recovery email address. If you cannot remember either of those, Apple Support can help you identify your account by verifying your identity over the phone.
Can I reset my password without restarting my Mac?
No, you must enter Recovery Mode, which requires restarting and holding Command + R. There is no way to reset a forgotten login password from within macOS itself.
How long does it take to erase and reinstall macOS?
Erasing the drive takes 5 to 15 minutes. Downloading and installing macOS takes 30 minutes to 2 hours depending on your internet speed. Restoring from a Time Machine backup can take several more hours if you have a lot of data.
What if my Mac is too old to use Recovery Mode?
Macs from 2011 and later support Command + R Recovery Mode. If your Mac is older than that, you will need to use an older method involving your original installation discs, or contact Apple Support for guidance specific to your model.