Unless you use the Linux package that does manage swap files dynamically.
https://github.com/Tookmund/Swapspace
https://github.com/Tookmund/Swapspace