Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

echo 3 > /proc/sys/vm/drop_caches on Mac OSX

Linux's command

echo 3 > /proc/sys/vm/drop_caches

I read this command in URL:

https://unix.stackexchange.com/questions/58553/how-to-clear-memory-cache-in-linux

What command is similar on Mac?

like image 283
Huynh Inc Avatar asked Dec 12 '25 07:12

Huynh Inc


1 Answers

On OSX there is a purge command for that:

sync && sudo purge

sync - force completion of pending disk writes (flush cache)

purge - force disk cache to be purged (flushed and emptied)

like image 82
kenorb Avatar answered Dec 14 '25 22:12

kenorb