how to free up ram in linux code example
Example 1: clear ram linux
sudo sync; echo 3 > /proc/sys/vm/drop_caches
Example 2: how to clear memory in ubuntu 18.04
# Clear PageCache, dentries and inodes.
sync; echo 3 > /proc/sys/vm/drop_caches
Example 3: linux free up ram
free && sync && echo 3 > /proc/sys/vm/drop_caches && free