In this tutorial, I will show you how to free up as much memory as possible by using a very simple command in Linux, it’s may applied on Ubuntu, CentOS, openSUSE or any Unix system. By using this command, you don’t need to normally reboot your server to clear the cache from the memory.

Here I would like to share a script which you can use to clear your cache memory. IMPORTANT NOTICE: This is something one should not do as cache is used to speed up your work activity building a cache memory but still if you feel to clear your cache memory size then you can follow the following steps. If you want to manually clear the cache that can be done easily by sending an echo command to the /proc filesystem indicating to the kernel to drop the cache and free the memory used for the cache. The instructions for running the command were shown above in this article and the experimental validation of the cache behavior before and after flushing were also shown. First - the echo command you gave should be clearing the page cache. This is the same command given here. The page cache is managed by the kernel. It is not used (at least directly) by any process. The memory used by the page cache is available to be given to any process if the kernel decides to do that. The memory has not been leaked.
First, you should check your current memory usage by using command below:

There are 3 ways to help you free up a lot of memory, you can use either of following methods: Best mac for logic pro.
1. Free pagecache
2. Free dentries and inodes
Microsoft security essentials mac. 3. Free pagecache, dentries and inodes
All of them are quite easy but I always choose command number 3 for my server. You can create a cron job in your system to automatically free up your memory at a time specified.
After run one of 3 commands above, you should run free -m to check how it works.
You can write to /proc/sys/vm/drop_caches file to instruct kernel to drop clean caches, as well as reclaimable slab objects like dentries and inodes. Once dropped, their memory becomes free.
This is not recommended to clear memory cache on Linux systems, but it is safe. But clearing cache may cause performance issue with system. Since it discards cached objects from memory, it may cost a significant amount of I/O and CPU to recreate the dropped objects.

This tutorial will help you to clear memory cache on Linux/Unix system via command line.
How to Clear Cache in Linux System
There are three options available to clear cache in Linux system memory. Use one of below as per your requirements.
Centos Clear Cache Memory Download
- Clear PageCache, dentries and inodes in cache memory
- Clear dentries and inodes only in cache memory
- Clear pagecache only in cache memory
Here the sync command is used to increase the number of objects freed by the drop cache. Using this a user can claim more memory by clearing more dirty objects on the system.
How to Schedule Clear Memory Cache
If you have to clear buffer cache regularly, use the cronjob do it. Schedule the following in system crontab to automatically flush cache memory on a regular interval.

Open a terminal and execute ‘crontab -e’ command to edit crontab:
Append below entry to the file:
Centos Clear Cache Memory
The above cron will execute on every hour and flushes the memory cache on your system.
How to find Cache Memory in Linux
Use free command to find out cache memory uses by Linux system. Output of free command is like below
Output:
Here the last column is showing cached memory (12953 MB) on Linux system. The -m option is used to show output MB’s.
