Adjust virtual memory

How can I change my virtual memory (Swap) limit? It’s currently set to 512 MB but I want to lower it to 256 MB. See underlined text (orange):

You don’t want to do that. You’re tight on memory, already. If it were me, I’d be increasing swap to 1GB or more.

But, if you really want to do it, it depends on whether it is a swap partition or a swap file. If it’s a swap file, just unmount it, delete it, recreate it at a smaller size. If it’s a swap partition, unless it’s inside of an LVM volume, you won’t be able to reclaim the space very easily/safely.


Alright thanks! How should I resize the swap file?

As I said:

I’m confident you can google “how to create a swap file linux”. :wink: