How To Remove Container without Data loss on Mac
For using High Sierra I made partition of my hard drive. It was quite good for me, I deleted the partition and now running High Sierra as OS. But now I realized that I have done something wrong, when deleting the partition. Because I have APFS container disk 2. Since my time machine give me an error and cannot finish backup. I believe this is because of the container as time machine was running before which I deleted the partition.
Please suggest me best way to remove this container without losing the data. I searched on internet and found merging the container could fix the partition. But I am not sure about, and much concern about my data if anything misshapen during this process can I recover it or not and how?
With the advent of APFS (Apple File System) with MacOS HighSierra, Disk Utility acquired some additional capabilities that allow it towork with APFS and its support for containers.
The new APFS system has a basic container storage unit thatconsists of various volumes. These volumes are the logical drives that we viewin Finder. Therefore, to reclaim the space on its drive, users often delete theAPFS partition. Nevertheless, this might be a little complicated.
Before you proceed, make sure that you have taken a completebackup of your data after that you need to take the assistance of Disk Utilityand Terminal to delete APFS partition on macOS Sierra. Even if you have usedthe Disk Utility tool to undo the APFS system, chances that you would find thecontainer of APFS. To merge partitions and save more space, you have to deletethe existing APFS partition on MacOS Sierra
1. To start with, you need to go to SystemPreferences and launch the Disk Utility tool. On the left panel, you can viewthe APFS container for your Mac.
2. Simply select the APFS container andright-click it. From the provided options, click on "Eject".
3. As theAPFS container would be ejected, you can delete it. To do this, you need tolaunch Terminal on your Mac.
4. Now,write the command "diskutil list". This will display all the vitalinformation related to your disk. From the displayed data, you need to note theidentifier for the APFS container. In this case, you can see that ouridentifier has been highlighted.
5. Afternoting the identifier, you can provide the command "diskutil apfsdeleteContainer <identifier>". Suppose if the APFS container’sidentifier is disk2s2, then the command would be "diskutil apfs deleteContainerdisk2s2".
Please note that this technique is followed to delete APFSpartition on macOS Sierra with an external hard drive. In order to follow thesame steps regarding an internal drive, you need to reboot your Mac in therecovery mode. In case if the method won’t yield the desired results, then youcan simply disconnect the external drive and connect it once again. Repeat thesame process to make it work.