Turn off existing swap file

sudo swapoff /swapfile

Create a new, larger file (e.g., 36GB)

sudo dd if=/dev/zero of=/swapfile bs=1G count=36

Set permissions and format

sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile