Reducing the swap file size after Endeavouros has been installed

Hi all! I installed Endeavouros a few days ago using the manual partitioning from this video.
I did everything exactly as in this video, except that I chose a different file system for the root partition and a different swap file size. I set the size of the swap file to 1024 MiB, but when I installed Endeavouros, after some time of work I realized that I did not need such a size of the swap file. I want to change the size of the swap file, namely, reduce it by 512 MiB, in order to free up disk space, but I don’t understand how to do it, I don’t even understand where to start.

It is a swap file or a swap partition?

As I understand it, this is the swap partition, since it is displayed in the “gnome-disk-utility” application.

Can you share the output of lsblk

Screenshot from 2023-02-06 11-05-11

You should be able to reduce the swap partitions size easily with gparted after booting the live iso.

But, IMHO, I wouldn’t bother recovering about 0.05% of the drives space! It’s not worth the risk; partition resizing is usually unproblematic, but things happen :wink: .
Plus, if you leave the swap partition as it is you could use the unneeded space to increase the boot partition, should the need arise some time later. Potentially moving a couple of hundred G’s just to increase the swap or boot partition at a later time isn’t fun.

1 Like

Also, why would you want to? A 1G swap partition is pretty small to begin with.

The benefit of making it smaller is small in this case, but having it when you need it is the difference between running out of memory or not.


According to my observations, as well as the experience of people I know, for my tasks the “classic” 512 MiB swap partition is more than enough, I am completely sure and convinced of this.

Yes, I also thought about gparted, but what you wrote makes me think a little about the stability of the system…