You can play with your machine's swappiness
setting and configure a lower value like 10 instead of the default 60. See How do I configure swappiness? for how to change it.
The swappiness
determines the balance between avoiding swap and preferring to keep free memory for caches and stuff. Lower values mean less/later swap usage.
I would not completely disable swap though, because if you then run out of memory, even just a tiny bit and very briefly, the OOM-Killer (Out Of Memory) will kick in and start randomly terminating processes until enough RAM is available again. You normally want at least a little buffer there. Doesn't have to be 8GB, maybe just 2GB, but nothing isn't the best option usually.