Notice to other users: This answer is specific for this particular question (this OP). You have to modify the partitions etc for other cases.
Edit: The solution in this case was to use a swap file instead of a swap partition.
In this case you can treat the SSD just like an HDD (and be prepared to replace the SSD when it fails).
Backup the whole SSD (to have a current version, if something would go wrong).
Boot a live session from another drive, for example an Ubuntu desktop USB drive.
Swapoff all partitions that are used, and unmount the ext4 partition
sudo swapoff -a
sudo umount /dev/sda5
Start gparted and use it to edit the partition table of the SSD (/dev/sda).
Shrink the ext4 partition
/dev/sda5 to create space for the swap partition. (This might take long time.)
Use the unallocated space to create a swap partition.
Perform the actions by clicking on the check icon.
Start a terminal window
Run the following command to find the UUID of the swap partition
You probably see something like the following line for your new swap partition
/dev/sda6: UUID="03bed9e9-e39b-6307-8ce5-c2612af9a6aa" TYPE="swap" PARTUUID="731f415c-05"
Edit the file
fstab of your installed system. Mount the partition where it is first,
sudo mount /dev/sda5 /mnt
sudo nano /mnt/etc/fstab
and modify the line pointing to the current swap partition, so that it will point to the new swap partition.
UUID=03bed9e9-e39b-6307-8ce5-c2612af9a6aa none swap sw 0 0
Use the UUID from
blkid without quotes.
I hope I remembered all important steps. Anyway, you can remove the old swap partition now, and use that drive space for data storage.
The following link might help you, if you need help to get started with gparted,
But in this case you will 'ShrinkIt' ;-)