I have an old macbook I want to put on ebay. I know very little of macs, linux, etc.

I found info about ‘factory resetting’ it -

Boot it while holding command and S

at the terminal, type

mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now

I can then get into it / it looked new. But how do I make sure there’s no other user accounts / user info on the hard drive? And is there a native way in the Mac OS to wipe free space / make sure the data isn’t recoverable all that easily?)

Answer from spiceuser-8y57u on community.spiceworks.com
🌐
Apple Support
support.apple.com › en-us › 102664
Erase your Mac and reset it to factory settings - Apple Support
May 13, 2026 - Use the Erase All Content and Settings feature to quickly and securely erase all settings, data, and apps, while maintaining the operating system currently installed. If your Mac with Apple silicon and macOS Tahoe 26 or later was previously repaired, or you’re not sure, use Repair Assistant to check for an unfinished repair.
🌐
Apple Community
discussions.apple.com › thread › 255640338
How do I factory reset my Mac? - Apple Community
You won't see any of your previous data or settings. ... Make sure you have a stable internet connection for downloading macOS during Internet Recovery. For added security, consider using a secure erase option in Disk Utility (if available for your specific model). This takes longer but makes data recovery more difficult. By following these steps, your 2015 iMac will be completely wiped and ready for its new owner to create their own user account. ... How do I factory reset my MacBook I have an early 2014 MacBook Air that I want to factory reset.
Discussions

MacBook - how to factory reset it AND delete user info
I have an old macbook I want to put on ebay. I know very little of macs, linux, etc. I found info about ‘factory resetting’ it - Boot it while holding command and S at the terminal, type mount -uw / rm /var/db/.AppleSetupDone shutdown -h now I can then get into it / it looked new. More on community.spiceworks.com
🌐 community.spiceworks.com
41
5
February 23, 2020
How to reset macbook pro to its factory settings as if new
How do I reset my MacBook Air to the factory settings. It’s an Apple m3. It’s an Apple m3 2024. It says MacBook Air ... Disclaimer: The customer and expert messages presented herein may have been altered or modified to enhance readability and safeguard the privacy of individuals. These modifications do not change the intent or substance of the original messages. ... MacBook Pro users often struggle with incomplete resets and data not fully erased during factory restore... More on justanswer.com
🌐 justanswer.com
0
July 7, 2024
Help me return my Mac book Air to its factory setting
My Mac Book Air will not use its inbuilt microphone or speaker - just get "hardware not found" message - any thoughts · I would like to restor to factory setup.. Mac Book Air. More on justanswer.com
🌐 justanswer.com
0
March 11, 2025
How to factory reset a MacBook or Mac: Reset a Mac to factory settings
If you are selling your MacBook or Mac, trading it in, or just passing it on to friends or family, you would be wise to wipe the Mac and restore it to factory settings first. More on community.opentextcybersecurity.com
🌐 community.opentextcybersecurity.com
4
July 29, 2024
🌐
Reddit
reddit.com › r/macos › what’s the proper way to completely restore my mac to factory settings? i mean everything gone
What’s the proper way to completely restore my Mac to factory settings? I mean everything gone : r/MacOS
July 12, 2024 - Use Spotlight to search for “Erase”. You’ll see an option come up in Settings to Erase all data. That’ll do it. ... Factory reset always wipes everything. If you just want a refresh without losing data, boot into Recovery (hold power > Options) and choose Reinstall macOS.
🌐
CNET
cnet.com › tech › computing › laptops › how to factory reset your macbook: erase your data before you sell or trade it in
How to Factory Reset Your MacBook: Erase Your Data Before You Sell or Trade It In - CNET
January 22, 2026 - Newer MacBook models have an erase assistant built into their settings to help you quickly clear your data and factory reset your MacBook.
🌐
Mac-Forums
mac-forums.com › apple computing products: › macos - operating system
How to Factory Reset Big Sur? | Mac-Forums | Fix Mac iPhone iPad | Buying Tips | iOS OS Help
September 21, 2024 - How do I factory reset my Mac Big Sur OS? macOS Big Sur or older · Power off your Mac. ... In Recovery mode, click Disk Utility from the menu. Click Continue. Select the Macintosh HD and click on Erase. ... Voila, your MacBook has been reset. Click to expand...
Find elsewhere
🌐
PCMAG
pcmag.com › home › how-to › operating systems › macos
How to Factory Reset a Mac If You're Ready to Start Over | PCMag
December 9, 2024 - Enter your password to sign out of your Apple Account, then let the erase process finish. Once complete, the Mac will be returned to factory settings. If you don't plan on keeping this computer, you're done.
🌐
JustAnswer
justanswer.com › mac-computers › ph37q-reset-macbook-pro-its-factory-settings-new.html
How to reset macbook pro to its factory settings as if new or never been used after backing everything up
July 7, 2024 - Restart and hold Command + R to enter Recovery Mode. Use Disk Utility to erase the startup disk, then reinstall macOS from the recovery menu. This process removes all personal data and settings, restoring the device to factory defaults.
🌐
Apple
it-training.apple.com › support › tutorials › course › sup170
Erasing, Reinstalling, or Restoring Mac
This page requires JavaScript · Please turn on JavaScript in your browser and refresh the page to view its content
🌐
Macworld
macworld.com › home › how-to
How to wipe a Mac and set it up as new, even without the password
January 20, 2023 - In this article we show how to get around this problem and restore the Mac to its factory settings even if you haven’t got the password.
🌐
Apple Support
support.apple.com › en-us › 102773
What to do before you sell, give away, trade in, or recycle your Mac - Apple Support
April 20, 2026 - These steps erase all of your data from your Mac. If you back up your Mac first, you can use that backup to restore your files to a new Mac. Or you can transfer your files from this Mac to another Mac. The Erase All Content and Settings feature makes it easier to reset your Mac to factory settings.
🌐
NordVPN
nordvpn.com › blog › factory-reset-macbook
How to factory reset your MacBook Air or Pro | NordVPN
April 30, 2026 - Learn how to factory reset your MacBook Pro or Air with different macOS versions before selling or passing it on to someone else.
🌐
MacRumors
macrumors.com › how-to › erase-and-factory-reset-your-mac
How to Erase and Factory Reset a Pre-2017 Mac - MacRumors
However, we highly recommend that you take the time to perform a Time Machine backup of your system using an external drive. That way, the same backup volume can be used by Apple's Migration Assistant during a macOS installation to quickly transfer your applications, files and settings from the old Mac to a new one.
🌐
JustAnswer
justanswer.com › mac-computers › rf82n-help-return-mac-book-air-its-factory-setting.html
How to Reset Your MacBook Air to Factory Settings
March 11, 2025 - To factory reset your MacBook Air, first back up important data via Time Machine. Restart and hold Command + R to enter Recovery Mode. Use Disk Utility to erase the startup disk, then reinstall macOS from the recovery menu.
🌐
Asurion
asurion.com › connect › tech-tips › how-to-factory-reset-macbook-pro-or-any-mac
How to factory reset a MacBook Pro or any Mac | Asurion
May 22, 2026 - Need to factory reset your MacBook? Learn how to erase and reset any Mac safely, whether you’re selling it or fixing a serious problem.
🌐
JustAnswer
justanswer.com › mac-computers › mx32j-reset-mac-os-high-sierra-factory-settings.html
How to Factory Reset macOS High Sierra: Expert Q&A Guide
Restart and hold Command + R to enter Recovery Mode. Use Disk Utility to erase the startup disk, then select 'Reinstall macOS' to restore factory settings. Ensure a stable internet connection for downloading the OS.
🌐
Technology Org
technology.org › how-and-why › factory-reset-macbook-guide
How to Factory Reset MacBook: Full Step-by-Step Guide - Technology Org
3 weeks ago - On macOS Ventura 13 and newer, the reset lives under System Settings > General > Transfer or Reset. On macOS Monterey 12, it appears directly in the System Preferences menu bar. Back up your files with Time Machine or iCloud before starting ...
🌐
OpenText Cybersecurity
community.opentextcybersecurity.com › home › community overview › welcome › tech talk › how to factory reset a macbook or mac: reset a mac to factory settings
How to factory reset a MacBook or Mac: Reset a Mac to factory settings | OpenText Cybersecurity Community
July 29, 2024 - @ProTruckDriver Sure hope I never have to Reset my IMac to default settings as I haven't the patience to do that anymore! 😉 · Having worked at Apple, the hardest machine to reset to Factory is the iMac. When I was leaving Apple, I could not make the proper procedure work, and ended up bricking the machine and it would not boot. A friend in the Mac group showed me how to connect another Mac to the iMac, and then run a bunch of commands that restored it to factory.
Top answer
1 of 3
13

FIRST: Please read What to do before you sell, give away, or trade in your Mac on Apple's website.

As for your question, it doesn't state what model MacBook you're trying to sell, so it's not clear if Mac OS X El Capitan is the original OS it shipped with.

However, your best bet is to boot into macOS Recovery using the ShiftOptionR keyboard shortcut. This keyboard shortcut is designed to install the version of macOS that originally shipped with your Mac.*

To do this:

  1. Fully shut down your Mac
  2. Power up your Mac again but immediately press and hold the ShiftOptionR
  3. Keep the keys down until you see either an Apple logo or spinning globe appear on screen (Note: If you have a firmware password set on your system, then let go of the keys when the password prompt appears)
  4. Once the Utilities window appears you'll be in macOS Recovery Mode

Now choose to reinstall macOS and follow the prompts.

* For users of older Mac models this option will install the closest version of macOS still available to the original that shipped with it.

2 of 3
5

As recovery mode is not available on that Mac, your best bet might be to restore with whatever you can any way you can, Then...

Once the Mac is up and running, download a version of macOS that will run on that Mac. Just the installer, don't run it just leave it in /Applications. If it STARTS to install just quit the installer.

Then use a utility like DiskmakerX to create a bootable installer on an 8GB flash drive. There are other ways to make a bootable installer but this is still my favorite.

Once you have the bootable installer you can boot from the flash drive, wipe the drive of the MacBook and install macOS clean with no AppleID associated with it.

I've done this a few times and it works a treat.