How to drop clean caches (Linux)

Command to drop cache

To free pagecache:

echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

echo 3 > /proc/sys/vm/drop_caches

Strongly advise to run sync first before do that. You can use command as below

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

Leave a Reply

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