Part of Apple SSD not accessible after failed bootcamp attempt
A couple of months back I tried installing windows through bootcamp on my system. For reasons I couldn't understand back then (and can't remember now), it failed. And as a result the total accessible size of my SSD somehow got reduced. Recently I upgraded to Catalina and it's still the same. I haven't tried formatting the SSD though. Disk Utility shows me the following:
Can someone please give me a pointer on what might be going wrong here?
[Edit]
diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI NO NAME 209.7 MB disk0s1
2: Apple_APFS Container disk1 91.6 GB disk0s2
3: EFI NO NAME 104.9 MB disk0s3
4: Microsoft Reserved 16.8 MB disk0s4
5: EFI NO NAME 104.9 MB disk0s5
6: EFI NO NAME 104.9 MB disk0s6
7: EFI NO NAME 104.9 MB disk0s7
8: EFI NO NAME 104.9 MB disk0s8
/dev/disk1 (synthesized):
#: TYPE NAME SIZE IDENTIFIER
0: APFS Container Scheme - +91.6 GB disk1
Physical Store disk0s2
1: APFS Volume Macintosh HD - Data 46.8 GB disk1s1
2: APFS Volume Preboot 83.1 MB disk1s2
3: APFS Volume Recovery 528.5 MB disk1s3
4: APFS Volume VM 2.1 GB disk1s4
5: APFS Volume Macintosh HD 10.7 GB disk1s5
/dev/disk2 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *129.8 GB disk2
1: EFI EFI 209.7 MB disk2s1
2: Apple_HFS Macintosh SD 129.4 GB disk2s2
diskutil info disk0s2 | grep -e Size -e Offset
Partition Offset: 209735680 Bytes (409640 512-Byte-Device-Blocks)
Disk Size: 91.6 GB (91554295808 Bytes) (exactly 178816984 512-Byte-Units)
Device Block Size: 512 Bytes
Solution 1:
All the partitions after disk0s2
can be returned to free space. The commands to do so are given below.
sudo diskutil eraseVolume free none disk0s8
sudo diskutil eraseVolume free none disk0s7
sudo diskutil eraseVolume free none disk0s6
sudo diskutil eraseVolume free none disk0s5
sudo diskutil eraseVolume free none disk0s4
sudo diskutil eraseVolume free none disk0s3
Next, the following command adds the free space to the APFS container in the disk0s2
partition.
sudo diskutil apfs resizeContainer disk0s2 0