LinuxWeb Hosting

Linux – Centos Cache Cleanup

Cache filling is among the problems that Linux users usually experience. Especially experienced in Centos versions, this problem can be solved with a too simple solution “which should not be a problem in our opinion”. Centos keeps a record of every event that happened on the server and allows the user to access more information.

These caches that are kept should be cleaned periodically, depending on the power of your server, as these caches will start to consume server resources after a while. Thus, we get rid of old caches that are useless for us and relieve our server. This operation is actually an easy, you can do it with a few lines of command. You can clean your Linux cache files by following the steps below.


  • First, connect to your server with putty or a similar program.
  • Type the following commands on the command line in order.


# sync; echo 3 > /proc/sys/vm/drop_caches

# sync; echo 2 > /proc/sys/vm/drop_caches

# sync; echo 1 > /proc/sys/vm/drop_caches


That’s it. Your caches are cleared now. As you see, you cleared the cache system with a 3-line command.

Leave a Reply

Your email address will not be published. Required fields are marked *