Can't format / delete locked partition from gparted?

If it's an LVM partition, you will need to deactivate it using the command lvremove which will remove the lock.
Only then can you delete the partition using gparted.

Use lvscan to view the volume.

Use lvremove to remove it.

Check man pages man lvscan and man lvremove for details.


Right click on the swap partitions and select swapoff. This will unlock the extended partition and let you resize/move.


Open a Terminal on Ubuntu (live cd) and force unmount the partition.

sudo umount -f <name of your partition>

The name of your partition is probably something like /dev/sdb or /dev/sda2. Be careful to type the right file name here. You can use df to find the device file for a mounted partition.