If you're concerned about the content of the swap, you can always turn it off as specified in the usual way with
sudo swapoff -a and then fill the swap device with zeros or random data using dd.
First use the content of fstab to find your swapfile or device (
Having located it and double and triple checked its location at say sda5 or
/swapfile (swap partitions were replaced by default with a swapfile in Ubuntu 17.04 (Zesty Zapus) and beyond).
In the case of a swap partition or drive (prefaced with /dev): issue the "disk destroyer" command (not to be used lightly),
sudo dd if=/dev/zero of=swap, replacing the word swap with the swap device or file you located in
to blast it full of zeros or
sudo dd if=/dev/random of=swap again replacing the word swap with the swap device or file you located in
to blast it full of random data.
In the case of a swapfile (prefaced with only a path):, you can simply delete the file with
sudo rm /path/to/swapfile, but it's better to just fill it with garbage as described above, so that the next time you turn swap on with
the system will happily use it again. If you have plenty of RAM you may not need swap at all. Issue the command
when the system is under heavy load and see how much is in use to make this determination.
If you determine that you permanently don't need swap (for hibernation or anything else) you can simply comment out that line in fstab as suggested here.