Cannot remove one of two ubuntus

I used to have an ubuntu installed on my second SSD (250 GB) but I had to re-install it because it crashed. Now I have only half of the drive available (118 GB) and two ubuntus in boot manager. There is also some windows-related partition that I don't need anymore.

I read a few topics about it but none of them helps. I cant remove those partitions or merge them to have just one, big partition.

To summarize: I want to have one partition (250 GB) with just one ubuntu.

see a screenshot from GParted


Solution 1:

If you've just completed installing Ubuntu, it's best to start a new installation and simply choose Erase the disk and install Ubuntu when prompted. Even if you have already created files that you want to retain, I suggest you back them up to a memory stick or cloud storage and reinstall anyway. See the full guide here.

Ubuntu installation guide disk selection

If you don't want to reinstall and lose all your data, you have another option.

Your new Ubuntu installation is likely inside /dev/sdb6, simply because it's at the far end of the partition. Disks are sequential and must be partitioned in order.

Because partitions are sequential, you cannot extended them backwards, as in, you cannot remove /dev/sdb4 (The old Ubuntu installation) and extend /dev/sdb6 backwards to take up the new space. Instead you could delete /dev/sdb4 and format it as an empty EXT4 partition and then use it to store files and such but it would still be a separate partition from /dev/sdb6.

I don't suggest you do this because it's messy and more difficult to manage but here are the steps:

  1. Open Gparted

  2. Click /dev/sdb4

  3. Click the Red Delete button near the top-left.

Gparted delete button

  1. /dev/sdb4 will become "unallocated". Click it and then click on the "Create a new partition" button.

Gparted new partition button

  1. By default the new partition window will choose the largest possible space as the default value, and will choose the filesystem as ext4. Click Add.

It will look something like this, although my disk is not the same size as yours so ignore the numbers.

Gparted Create New Partition window

  1. Click the Green tick to apply the delete operations.

The new disk will appear in your file manager and you can use it to store files.

Although I'm fairly sure /dev/sdb3 is related to Windows only, it's not very large and my suggestion is to leave it in place just in case it breaks something.

Gparted Apply button