Delete Unallocated Space?
Unallocated space is empty and there is nothing to delete.
Merge nvme0n1p5 and unallocated space?
You can't merge partitions. You can't merge a partition with unallcoated space. There is not "merge" option in Gparted. What you can do is "make the nvme0n1p5 bigger to fill the unallocated space" using using the context menu for the partition and select "Resize/Move". Currently two things prevent you from doing this.
First Problem: The partition nvme0n1p5 must be next to the unallocated space
Note the unallocated space is not next to nvme0n1p5, the Ubuntu partition. It is next to nvme0n1p4, an NTFS partition. From the Screenshot of Gparted in the question, the order of partitions and unallocated space looks like:
- nvme0n1p1
- nvme0n1p2
- nvme0n1p3
- nvme0n1p5
- nvme0n1p4 <-- in between the two!
- Big unallocated space
- nvme0n1p6
- Little unallocated space
You can use Gparted to move nvme0n1p4 to the right next to nvme0n1p6. However, it is safer to used Windows to manipulate Windows (NTFS) partitions.
I recommend you use Windows to move nvme0n1p4 to the right next to nvme0n1p6 using Windows tools. You want the partitions to be ordered like this:
- nvme0n1p1
- nvme0n1p2
- nvme0n1p3
- nvme0n1p5
- Big unallocated space
- nvme0n1p4 <-- Out of the way now!
- nvme0n1p6
- Little unallocated space
Second Problem: Partitions cannot be resized or moved when they are in use in Ubuntu
When you boot your computer to Ubuntu from the internal SSD, the boot process mounts nvme0n1p5 and uses it. While Ubuntu is running, trying to resize the Ubuntu partition is like trying to change the tire of your car while you are driving the car. The car cannot be moving when you change the tire.
Boot from Ubuntu Live USB you used to install Ubuntu. Use the Try Ubuntu option (Do not install Ubuntu). Make sure the nvme0n1p5 is not mounted.
Expand nvme0n1p5 using Gparted. Click the Green Check Mark in Gparted to apply all changes.
See How to resize partitions? for more details.
Hope this helps