In-RAM caches

Based onĀ kernel.org doc on sysctl/vm:

# free pagecache:
echo 1 > /proc/sys/vm/drop_caches

# free reclaimable slab objects (includes dentries and inodes):
echo 2 > /proc/sys/vm/drop_caches

# free slab objects and pagecache:
echo 3 > /proc/sys/vm/drop_caches

Swap

ATTENTION: Only if "real" RAM is free, and NOT under load or during high-traffic times.
swapoff -a
swapon -a