I used to run Ubuntu and Kali, but now I want to delete Kali and just extend the partition where Ubuntu is stored. I booted from a LiveUSB and deleted the partition where Kali was installed, and now that partition is unallocated. However, when I try to resize the Ubuntu partition, the slider will not move left. How do I solve that?
Your system is formatted with GPT instead of MBR, so there are no Extended partitions to deal with (simplifies matters).
If you are using Ubuntu 18.04 or newer, and do not use Hibernation, you do not need a separate swap partition, and can use a swap file instead. There was a problem in the kernel, fixed in late 2017, that made swap files slower.
If you don't use hibernation, you can unlock
/dev/sda7
by right-clicking on it. Delete it; we will make a swap file later after rebooting into Ubuntu from your system drive. Then, you can extend/dev/sda5
across the space formerly used by the swap partition into the unallocated space.Remember, with gparted, to make one change, then click the green check mark in the power bar before making another change.
/dev/sda1
is also useless, for you do not use Windows any more. However, you can't easily get at that space, without deleting and recreating the EFI boot partitions; it would be easier toCommands to make, then enable, a swap file (second command makes a two GB swap file with the bs= option, resize as it suits you):
You have a swap partition to the left of your /dev/sda5. Move this first, then resize your Ubuntu partition.