Ubuntu – How to remove a partition on a hard disk

gpartedpartitioning

When I was basically new to Linux (and I still quite am), I got a nice computer from my university, featuring a SSD (250 Gb) and a 2Tb hard disk.

I decided to use only Ubuntu, but I made the installation being distracted and I did it on the 2Tb hard disk, while I wanted it on the SSD. So now I have two partitions, one on the SSD and the other one on this 2Tb hard disk.

I need to free the 2Tb hard disk; I tried with GParted, but I don't get how to use it, plus it seems like this partition is locked.

How do I get rid of this useless partition? Do I just need to delete the linux-swap in order to be able to use the hard disk?

here what I see in Gparted

here what I see in Gparted

Best Answer

  • You can try to use fdisk from the command line. In your case, if you want to delete partition on /dev/sdb just type:

    fdisk /dev/sdb

    Then once fdisk is opened you can type "d" to delete and then select the partition(s) you want to delete. After you removed the partition(s) don't forget to write the changes.

    One advice, do not do that if you didn't reinstalled your OS on /dev/sda (your SSD) or you won't be able to boot the computer then.

  • Related Question