Simple command to free RAM on linux without rebooting
#!/bin/bash
sync;
echo 1 > /proc/sys/vm/drop_caches;
echo 2 > /proc/sys/vm/drop_caches;
echo 3 > /proc/sys/vm/drop_caches
Save into a file and set executable permission.
Run the file with root privileges.