How to clear swap usage on Linux

Swap is disk memory when physical Random Access Memory (RAM) is full.
We know that disk write and read speed is very slow compared to RAM.
But it not safe and not recommended to disable swap on Linux.
When your Linux does not have enough phisical RAM used by your applications, your Linux may use Swap space.
But the problem is Swap usage usually not released, and it’s problem for your server and performance.
If you want to force clear Swap usage, please check that your physical RAM is bigger than Swap used.
Use this command to check your RAM and Swap usage
# free -m
If available RAM smaller than Swap usage, it’s not safe to force clear Swap, and the safest way is reboot your server.