0

How to clear the cache in linux

I need to clear the cache in my system, where to clear those cache.....?????

Cache Linux Add a comment
nicholas
asked Feb 08 2017

Answer

0

By default, there are various caches like RAM, swap space, Buffer, etc.

Those cache will be saved in /proc/sys/vm/drop_caches

To clear, run the below commands:

# sync; echo 1 > /proc/sys/vm/drop_caches                            [For Pagecache]
# sync; echo 2 > /proc/sys/vm/drop_caches                            [For inodes]
# sync; echo 3 > /proc/sys/vm/drop_caches                            [For both]
# swapoff -a                                                         [For swap cache]
Add a comment
jagannatharumugam
asked Feb 08 2017
edited Oct 05 2018
Post your Answer