This question already has an answer here:
Ubuntu 17.04 introduces a swap file to replace swap partitions. However, I would prefer not to have any disk-based swap space at all, so I would like to know how to turn the swap file off.
Clarification: I need a way to turn the swap file off permanently. AFAIK, the swapoff command only disables it temporarily.
Clarification 2: I do not want swapping disabled completely, as I am using zram as my swap. I only want the swap file disabled.
My question specifically deals with the swap file, while the answers to the other questions deal with either turning off the swap partition, or they deal with turning off all swap. I do not want either, I just want the swap file turned off.