To free pagecache:
# sync; echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
# sync; echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
# sync; echo 3 > /proc/sys/vm/drop_caches
==> sync - flush file system buffers