4

I want to delete my extended partition of ext4 in ubuntu. I using disk utility but can't delete or format. please tell me the procedure through terminal.

subodh007
  • 350
  • 2
  • 12
Rakesh
  • 1,159
  • 1
    What error are you getting in Disk Utility? You can use gparted. Install it using sudo apt-get install gparted if it's not installed, and run it from the dash. It's a partitioning tool. Find your partition and right click > delete. However, you have to unmount the partition first (right click it > unmount). You can't however unmount partitions mounted as / or /home, you'll have to use a LiveCD for that. But, I hope you're not trying to delete /, because that's your Ubuntu operating system, unless that's your intention. – Alaa Ali Jun 20 '13 at 06:14

2 Answers2

6

Here are details on fdisk command

Don’t edit partitions while they’re in use. If you want to edit system partitions, boot from a live CD first.

Start with sudo fdisk -l and determine the name of the partition you want to delete (sda1, sda2, etc).

Then, sudo fdisk /dev/sdax with 'sdax' being the drive you would like to delete. This will enter command mode.

After in command mode, (type 'm' if you want the help menu) you will use 'p' to delete the partition. After this, it prompts for partition number, which is just the 'x' from 'sdax'. Then use 'w' to actually write the change.

travisw
  • 344
  • 3
  • 6
  • 16
  • 3
    as of today, Sept. 23, 2015 your advice has little problems. One need to use the command sudo fdisk /dev/sda or sdb, sdd whatever, without a digit. Then one must use d, not p as you wrote. Then everything worked out as you described. – d.k Sep 22 '15 at 21:25
3

you could use Gparted ( search it in ubuntu software center )

xRobot
  • 159