triston-notes/Cards/dev/Delete MacOs Partition.md
2023-10-21 18:52:54 -05:00

1.4 KiB

up:: Terminal tags::

How to delete Macos Partition

If you want to remove the entire APFS container and all of its volumes, you can use the diskutil command in Terminal to do so. Here are the steps to follow:

  1. Open Terminal from the Applications/Utilities folder.
  2. Type the following command and press Enter:
diskutil list

This command lists all disks currently connected to your Mac.

  1. Identify the identifier for the APFS container that you want to remove. It will have a format similar to "/dev/disk1".

  2. Once you have identified the identifier for the APFS container, enter the following command to delete it:

diskutil apfs deleteContainer [container identifier: disk5]

Replace [APFSContainerIdentifier] with the identifier for the APFS container that you want to remove.

  1. Press Enter and then enter your administrator password if prompted.

  2. The Terminal will then begin removing the APFS container and all of its volumes. This process may take some time, depending on the size of the container and the number of volumes it contains.

  3. Once the process is complete, the APFS container and all of its volumes will have been removed from your Mac.

Note

Removing an APFS container and all of its volumes will permanently delete all data stored on that container. Make sure to back up any important data before proceeding.