vim /etc/cron.daily/clearmemory.
#!/bin/bash
sync;
echo 3 > /proc/sys/vm/drop_caches
save, and change the permission.
chmod 755 /etc/cron.daily/clearmemory.
Checkthe amount of memory in your computer with the command “top”. And you will see the changes before and after running the file clearmemory.