Here's how you can free up unused memory on your Ubuntu computer.
1. Open a terminal window.
2. Type in the following command then hit Enter.
sudo sysctl -w vm.drop_caches=3
3. You can also use this command:
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches
For more, see the original article at the link below.