Mac mini, 500GB, OSX. I was halfway through making a dual boot Ubuntu system and quit before finishing. It left my 500GB with one un-modifiable partition labeled "Linux Swap", and also a smaller Mac OSX Base System .

Can I undo whatever I did, and just get back to normal OSX disk and boot stuff?

  • Can you undo whatever you did? Sure! First, do you have a backup of your data? Also, what version of macOS? What model Mac mini?
    – Allan
    Commented Apr 15, 2020 at 23:17
  • I do not have a back up of when it was a normal OSX running system. I do have a backup of how its configured now. Mac mini A1347 "Core i5" 2.5 (Late 2012) 2.5 GHz Core i5 (I5-3210M) 500GB running originally mountain lion i think. booting into recover disk util shows: 500.11GB Apple HDD (under that it shows disk0s2). Then a line under which is shows disk1 (under that it shows Mac OSX Base System Commented Apr 16, 2020 at 0:04

3 Answers 3


Your question is a bit sparse with respect to how you created the Ubuntu installer and the current state of your drive.

Most users attempt to remove linux partitions using either the Disk Utility application or the diskutil command. Often this results in failure.

Actually the result may be 100% failure, but I can not know that because those who succeed are not apt to post a question here at Ask Different.

An alternative would be to boot to a Live version of Ubuntu and use an application or command to remove the linux partitions. I usually use the command gdisk. Once the linux partitions are removed, the free space can be added back to the macOS partition. For example, if you are using APFS, then the usually command is shown below.

sudo diskutil apfs resizecontainer disk0s2 0
  • david, let me try alans first then i can look into your suggestion. thank ya Commented Apr 16, 2020 at 2:13
  • @SteveLanday You have two of the best people here on this, Allan is amazing, but David is the guy to walk you through diskutil to avoid my wipe everything option. Allan and my suggestions won’t be as friendly to saving your data or undoing a change as David’s skills and experience.
    – bmike
    Commented Apr 16, 2020 at 2:36

An erase and install will undo anything you’ve done to your Mac software.

  1. Get a backup if you please
  2. Erase and reinstall

Without a bit more detail, it is going to be hard to offer more than the most general guidance.

  • Understood. Try it this way, say I have an external drive that is now labled as a linux swap, but USED to be a full working bootable osx drive. Where would I go about getting it changed to anything else in order to see all the mac files that are still on it. File recovery service? Its not crashed, its just no longer being accessable my any os, linux or mac. havent tried connecting it to a windows machine to see if it see anything there that look like files. Commented Apr 16, 2020 at 2:31
  • I’ll defer to people like klanomath and David Anderson @SteveLanday they are clear experts and have a long string of answers already helping people out of jams like this.
    – bmike
    Commented Apr 16, 2020 at 2:37

Since it’s a 2012 Mac mini, it supports Internet Recovery. It originally came with Mountain Lion, but that is obsolete now. Press and hold Command Option R while booting. It will download the latest version of macOS that is supported.

Once booted, use Disk Utility to repartition your drive. Make a single JHFS+ or APFS (if available) GPT partition. Once finished, quit, then select “Reinstall macOS”

You’ll end up with a clean install on a single partition.

  • "how i created the ubuntu...", it was a youtube video which a searched everywhere for but can no longer find. It essentially had me make a thumbdrive ubuntu installer, and the start about creating a smaller partition for the duel boot aspecct to work. I got as far as that but stopped short on the last segment, which I cant explain since its been so long,l but i stopped because i got scared i would lose all the existing mac side stuff. Commented Apr 16, 2020 at 2:10
  • Anyway: I have one internal unknown * linux swap disk, and also one disk image called macos base system. I'm assuming its the internal disk that gets the JHFS or APFS partition? what size? Commented Apr 16, 2020 at 2:11
  • Also in Disk Util,in partition windows, at the bottom there is a message at that says this partition has 499.9 used space, it will be erased. Hmmm, id prefer that it werent. thoughts? Commented Apr 16, 2020 at 2:20
  • Is that GB? can you post a photo, or can you use Terminal and use the command diskutil list and post the output?
    – Allan
    Commented Apr 16, 2020 at 10:00
  • imgur.com/Yx26hFP Commented Apr 16, 2020 at 17:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .