How to clear swap memory on UNIX OS
Run free -m command to see current memory stats.
Run sudo swapoff -a command to disable swap memory.
Wait for ~30 seconds for swap data to be moved back into RAM.
Run sudo swapon -a command to enable swap memory.
Run free -m command to see the new memory stats.