What command can be used to force release everything in swap partition back to memory ?Presume that I have enough memory.
What command can be used to force release everything in swap partition back to memory?
linux;swap
From this Ask Ubuntu question:You can also clear your swap by running swapoff -a and then swapon -a as root instead of rebooting to achieve the same effect.Thus:$ free -tm...Swap:         6439        196       6243...$ sudo swapoff -a$ sudo swapon -a$ free -tm...Swap:         6439          0       6439...As noted in a comment, if you don't have enough memory, swapoff will result in out of memory errors and on the kernel killing processes to recover RAM.