35 lines
1.4 KiB
Markdown
35 lines
1.4 KiB
Markdown
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:
|
|
```zsh
|
|
diskutil list
|
|
```
|
|
|
|
This command lists all disks currently connected to your Mac.
|
|
|
|
3. Identify the identifier for the APFS container that you want to remove. It will have a format similar to "/dev/disk1".
|
|
|
|
4. Once you have identified the identifier for the APFS container, enter the following command to delete it:
|
|
```zsh
|
|
diskutil apfs deleteContainer [container identifier: disk5]
|
|
```
|
|
|
|
Replace [APFSContainerIdentifier] with the identifier for the APFS container that you want to remove.
|
|
|
|
5. Press Enter and then enter your administrator password if prompted.
|
|
|
|
6. 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.
|
|
|
|
7. 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.
|
|
|