Before clearing the memory, let’s check the current memory usage.

Command: free -m
Then, use the command to clear the memory cache: echo 1 > /proc/sys/vm/drop_caches
After running the clear command, you can use the check command again: free -m, to see if a significant amount of memory has been freed.
ps aux results sorted by memory usage
ps -aux | sort -k4,4n