The OS should clear the cache itself whenever it needs. However, if you want to delete cache yourself, you can run the following command. It should work on both Ubuntu and Debian.
echo 1 > /proc/sys/vm/drop_caches