I have two installations of Ubuntu 15.10 on my laptop, and I want to get rid of one of them. How can I remove one of them? I've seen a lot of answers to related questions, but they all deal with how to install from a startup disk or something like that, and wipe the hard drive. I want to keep one installation of Ubuntu, and remove the other.
3 Answers
So, you have Ubuntu A and Ubuntu B. Let's say you boot up in Ubuntu A that you want to keep.
Open GParted, unmount partition with Ubuntu B then select swap partition of Ubuntu B (if any), right-click on it and choose swapoff. Swapoff is important, so don't miss it. Select partition with Ubuntu B and delete that partition. Apply changes.
Open a Terminal window and type:
sudo update-grub
Close Terminal and reboot. After restart, only one Ubuntu (ex-A) should appear in the boot menu.
-
-
-
Swap partition is a special kind of partition used by linux operating systems as virtual RAM memory. When physical RAM memory is totally (100%) used, virtual RAM comes up to help it and expand total RAM capacity. Same type of things happens in Windows too, but Windows uses empty space on C:\ as virtual RAM. When C:\ is full, no more virtual RAM is available and Windows get stuck in certain situations. Having virtual RAM as dedicated space/partition prevents linux from getting stuck. Commented Jun 1, 2016 at 17:30
-
Any Ubuntu installation should automatically create a swap partition. But some users delete that because various reasons (huge physical RAM, insufficient disk space, using external device as swap-virtual RAM, or simply because self-ignorance). Commented Jun 1, 2016 at 17:35
-
please correct the command, you should have
sudo update-grub
Commented Jun 1, 2016 at 17:55
You can use GParted to format the partition and then run an upgrade grub command to update bootloader that the partition no longer has an OS.
If the two installation are on separate partitions and don't have any common mount points like /home
or /bin
, you can pretty much safely format the unwanted partition and generate new grub menu entries.