In this tutorial, we will see how to use the terminal to clean up unused memory that was not released properly after being used by your system. No need to use any third-party software, just a few commands will do the job pretty easily.
Have a little problem with a server freezing which might be memory related. This simple tutorial was very helpful.
You can free up unused memory under Ubuntu/Linux Mint using this command:
sudo sysctl -w vm.drop_caches=3