I previously had a dual boot (Linux and macOS) setup. I added UBUNTU and SWAP partitions to the existing macOS partition.
I no longer need Linux so I deleted the UBUNTU partition but I still see the SWAP partition. It doesn't look like I can delete the SWAP partition and my macOS partition is now named disk0s2.
Can you help remove all remnants of UBUNTU and SWAP partitions so that I just have the macOS partition. (I'm running out of disk space when downloading so I want to free up disk space).




diskutil listis more useful than posting images of the Disk Utility. – David Anderson Apr 29 '23 at 07:16Physical stores:is showing--. In other words, there is a good chance the partition type fordisk0s2has be changed toFFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF. – David Anderson Apr 29 '23 at 07:45gpt add -i 2 -b 409640 -s 461916744 -t apfs /dev/disk0given in klanomath's answer would need to be updated with the correct integer values. – David Anderson Apr 29 '23 at 08:03