Erase All Content and Settings Via termial

I want to Wipe multiple MacBook pro, is it possible I use terminal to Erase All Content and Settings via ssh so dont' need to login all mac via GUI



Posted on Apr 3, 2025 11:32 PM

Reply
3 replies

Apr 4, 2025 10:32 AM in response to ishwar278

Hey!


Absolutely, that is possible. Please make note of the Chip your MacBook has been launched with. You can check which chip the MacBook is of from Apple logo (top left corner) > about this Mac.


If the MacBook make is Apple silicon (M1, M2 , M3 OR M4 etc..) please follow the steps as mentioned :


> Turn off the Mac (press and hold the power button to turn off the Mac)

> Press and hold the power button on your Mac until the system volume and the Options button appear.

> Click the Options button, then click Continue.

> If asked, select a volume to recover, then click Next.

> Select an administrator account, then click Next.

> Enter the password for the administrator account, then click Continue.

> When you see the list of utilities in Recovery, select Disk Utility, then click Continue.

> In the Internal section of the Disk Utility sidebar, click on View > show all devices

> Select Macintosh HD > erase

-- Make sure to specify the same name and format as mentioned below:

  • Name: Macintosh HD
  • Format: APFS

> Erase

Your Mac will erase the macOS and the data installed in it. Make sure to reinstall the macOS by quitting the disk utility > reinstall macOS

Viola! it's done!






If the MacBook make is Intel based please follow the steps as mentioned :


> Turn off the Mac (press and hold the power button to turn off the Mac)

> Press and hold Command + option + R and turn on the Mac --- don't let go the 3 keys until you see any image on the screen. Once you see Apple logo you can let go the keys.

> Select an administrator account, then click Next.

> Enter the password for the administrator account, then click Continue.

> When you see the list of utilities in Recovery, select Disk Utility, then click Continue.

> In the Internal section of the Disk Utility sidebar, click on View > show all devices

> Select Macintosh HD > erase

-- Make sure to specify the same name and format as mentioned below:

  • Name: Macintosh HD
  • Format: APFS or Mac OS Extended (Journaled), as recommended by Disk Utility


> Erase

Your Mac will erase the macOS and the data installed in it. Make sure to reinstall the macOS by quitting the disk utility > reinstall macOS


I am attaching the dedicated articles below for the respective MacBooks


For the Apple Silicon MacBooks : Use Disk Utility to erase a Mac with Apple silicon (How to erase (format) the built-in startup disk of a Mac with Apple silicon.)



For the Intel Based MacBooks : Use Disk Utility to erase an Intel-based Mac (How to erase (format) the built-in startup disk of an Intel-based Mac.)

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Erase All Content and Settings Via termial

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.