Disable SWAP or decrease size of swap file

I am using HAOS (x86-64) on a re-purposed thin client with 16G of RAM and 15G SSD. /mn/data contains a 5G swap file, which, obviously, is not needed and wastes disk space (fills SSD to 100%).

I can log in as root and delete/unmount the swap file to regain space but it is recreated on reboot.

Is there a way to configure the system to disable SWAP? Alternatively, if it cannot be disabled, can it be set to something negligible, say, 32M?

Any thoughts?

2 Likes

According to How to increase the swap file size on Home Assistant OS you might be able to delete it with a script on every boot, but Iā€™d also prefer to have a toggle to disable it permanently.

+1 for this, swap murders SSDs (of any size)

1 Like

Anyone found how to do this ?

I also want to disable swap on my Raspberry Pi, at the same time I want to enable ZRAM.