That’s how it goes for Ubuntu:

Disable current swapping strategy ( swappiness it’s called)

echo 0 > /proc/sys/vm/swappiness

Disable swapping all together

swapoff -a

Don’t swap after restart as well

echo “vm/swappiness=0” » /etc/sysctl.conf

P.S! Read man-pages first and use at your own risk!