- Put OFF swap partition
sudo dphys-swapfile swapoff
- Edit this file
sudo vim /etc/dphys-swapfile
- Change variable CONF_SWAPSIZE=100 with new value 1024 ( size on MB )
CONF_SWAPSIZE=100
- Update File size with script
sudo dphys-swapfile setup
- Put ON swap partition
sudo dphys-swapfile swapon