This is something one should not do as cache is used to speed up your work activity building a cache memory but still if you feel to clear your cache memory size then you can follow the following steps:
# vi clearcache.sh
sync; echo 3 > /proc/sys/vm/drop_caches
# chmod +x clearcache.sh
Sync should be run beacause this is a non destructive operation and dirty objects are not freeable. So we run sync in order to make sure all cached objects are freed.
echo 1 is clearing only page cache
echo 2 is to clear free dentries and inodes
echo 3 is clearing page cache, dentries and inodes