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.
Asked
Active
Viewed 4.0k times
4
2 Answers
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
-
3as 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 used
, notp
as you wrote. Then everything worked out as you described. – d.k Sep 22 '15 at 21:25
gparted
. Install it usingsudo 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