Please try steps below:
- identify what is the current usage via "top" or "htop"
- try to turn off those applications that might cause high memory usage, like apache / mysql / php process.
- identify which partition was used for the SWAP usage
- # cat /etc/fstab
- now we can clear up the SWAP via
- # swapoff /dev/sdax
- at the same time, try to monitor closely the SWAP space used in "top" or "htop", it should decrease slowly. And it shall be zero once the "swapoff" command finished.
- now, add back to SWAP partition via
- # swapon /dev/sdax
- use back the "top" or "htop" to double check your SWAP usage.
And by now, your system should have cleared up those old SWAP usage. And it's time for you to do proper server planning, to add more memory of fine tune your configurations.