Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have dual booted Ubuntu 12.04 on my Mac using disk utility and the rEFIt tool.The battery life is very bad and therefore I want to switch back to Ubuntu 10.04 . How can I completely remove the 12.04 partition?

share|improve this question
    
If you wish to reuse the same partition for 10.04, it's simple; just install 10.04, choose "something else" and pick the 12.04 partition for the main OS, and check the format checkbox, which will erase everything. –  Marty Fried May 25 '12 at 18:50

1 Answer 1

Since you're switching back to Ubuntu 10.04 LTS, you won't want to expand your other OS (I am guessing it's Mac OS X) to fill up the space that had been used for Ubuntu's partitions, because you'll just be installing 10.04 after removing 12.04. This simplifies things.

It is a good idea to actually remove the partitions though, to ensure that Ubuntu 10.04 LTS's installer sees unpartitioned space that it can use.

Boot from the Ubuntu 10.04.4 LTS installation CD/DVD or USB flash drive. (It's worth getting that point release's installation media even if you have the original 10.04 LTS installation media or media for an earlier point release.) Select Try Ubuntu without installing (not Install Ubuntu).

Make sure to back up any data in your Ubuntu partitions, as you'll be deleting them and it's a hassle (and sometimes impossible) to recover data from a deleted partition. It's also a good idea to ensure your backups of documents and other important files in your other OS's partition are current. This is less necessary since you won't be resizing that partition, but you could still make a mistake.

Open GParted (System > Administration > GParted Partition Editor). The Ubuntu partitions are of type ext4 and linux-swap (or, if you started with a very old Ubuntu system, ext3 and linux-swap). Remove them, but make sure to keep other partitions. (These other partitions are probably, but not necessarily, of type hfs+, since that's what Mac OS X uses. If your other OS is Windows, then its partitions would probably be ntfs.)

After removing those partitions, click the green check mark to apply your changes. Wait for it to finish. Then quit GParted. Double-click on the Install Ubuntu icon on the desktop, and this will start the Ubuntu 10.04.4 LTS installer. When you install, make sure not to tell it to use the whole disk, as this would wipe out your existing (Mac OS X?) operating system.

share|improve this answer
    
I don't know about this particular Mac, but I had an old Mac where gparted was unable to work well with the Mac's HFS. I had created a partition for the install, then wanted to either delete or resize, but couldn't. But this was a while back. –  Marty Fried May 25 '12 at 17:42
    
@MartyFried The OP doesn't need to make any modifications to any of the HFS+ filesystems, in this case. For someone who did (which would be a different question), I'd recommend using a newer version of GParted than is present on an Ubuntu 10.04 LTS installation CD (even with the 10.04.4 point release, GParted still won't be as current as may be desirable). –  Eliah Kagan May 25 '12 at 17:53
    
Could be, it's been a while since I did this, and I think it was on a PowerPC Mac, too. But my experience with the installer is that deleting the partition first is pretty unnecessary, as it never seems to want to use it unless you tell it to anyway, so you might as well just tell it to use the existing partition, and reformat. I used to manually partition everything first, and it still wanted to default to shrinking some used partition instead. Also, deleting and creating a new one increases the partition number, which I hate. –  Marty Fried May 25 '12 at 18:57
    
@MartyFried You can leave the partitions, but then the installer will want to shrink them and create new ones if you tell it to install "alongside" the existing operating system. (This can be particularly problematic since it will also shrink the HFS+ partitions...or try and fail to do so, due to an old GParted version.) Unless you plan to partition manually during the installation, it's easier to remove it manually. If by the partition number you mean like /dev/sda1, /dev/sda2, and so forth, deleting and making a new partition does not ordinarily increase that. –  Eliah Kagan May 25 '12 at 18:59
    
I don't ever use primary partitions, and I'm pretty sure the number do get increased for logical partitions.' –  Marty Fried May 25 '12 at 22:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.