Most of the articles I found in searching for how to do this instructed running these commands at the solution to disabling swap on Raspbian Buster:-
$ dphys-swapfile swapoff $ dphys-swapfile uninstall $ update-rc.d dphys-swapfile remove
However, after a reboot, swap was re-activated.
After a bit more poking around, I got to permanently disable swap with the following:-
$ dphys-swapfile swapoff $ dphys-swapfile uninstall $ update-rc.d dphys-swapfile remove $ rm -f /etc/init.d/dphys-swapfile $ service dphys-swapfile stop $ systemctl disable dphys-swapfile.service
I’m still confused about services that have entries both for systemd and init.d. So if you have some insights into this, please let me know.