Clear RAM Memory Cache, Buffer and Swap Space on Linux

Created on 2022-08-31T12:26:38-05:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

Clear PageCache only.

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

Clear dentries and inodes.

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

Clear PageCache, dentries and inodes.

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

If you want to clear Swap space, you may like to run the below command.

swapoff -a && swapon -a