ubuntu clear swap space 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