how to flush swap memory in linux code example
Example 1: clear swap memory linux
sudo swapoff -a; sudo swapon -a
Example 2: clear ram linux
sudo sync; echo 3 > /proc/sys/vm/drop_caches
sudo swapoff -a; sudo swapon -a
sudo sync; echo 3 > /proc/sys/vm/drop_caches