My MacBook has three OSs at the same time: macOS, Boot Camp Windows 10, and Ubuntu. It will display Windows, Macintosh HD, and EFI Boot (going to Ubuntu) when pressing the option when booting. I split the disk size as follows:
macOS: 85 GB
Windows: 120 GB
Ubuntu: 40 GB
total: 256 GB
I used Disk Utility when trying to remove Ubuntu. However, I could not remove the partition Ubuntu uses. Then, macOS is broken (only Windows is fine). I solved macOS by following methods: macOS partition startup Volume type FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF.
Then, Windows is broken (only macOS is fine). I solved Windows by following methods: bootcamp NO BOOTABLE DEVICE after gpt add EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 disk0.
Now Windows and macOS are fine. I hope that EFI Boot will not be displayed when pressing the option when booting and Ubuntu 40 GB comes back to macOS (ie, macOS: 125 GB, Windows: 120 GB). What should I do without destroying other OSs while removing Ubuntu?
sh-3.2# diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *251.0 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk2 85.0 GB disk0s2
3: Microsoft Basic Data BOOTCAMP 125.8 GB disk0s3
sh-3.2# gpt -vv -r show /dev/disk0
gpt show: /dev/disk0: mediasize=251000193024; sectorsize=512; blocks=490234752
gpt show: /dev/disk0: PMBR at sector 0
gpt show: /dev/disk0: Pri GPT at sector 1
gpt show: /dev/disk0: Sec GPT at sector 490234751
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 166018024 2 GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC
166427664 78124016
244551680 245682176 3 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
490233856 863
490234719 32 Sec GPT table
490234751 1 Sec GPT header