How to clear your Mac’s RAM from Terminal

Would you like to know how to free up RAM on macOS? How to clear Mac’s RAM from Terminal? Let’s see how to speed up the Mac with a command from the Terminal.

Guide index:

  • 1Attention!
  • 1How to clear your Mac’s RAM from Terminal


This method completely resets the RAM cache, closing all application processes. Use it sparingly and only when strictly necessary.

How to clear your Mac’s RAM from Terminal

Do you use many applications at the same time on your Mac and do you often have to wait several seconds to perform a usually instantaneous operation? In this case, your Apple computer’s RAM (Random Access Memory) may be saturated, slowing down process execution and consequently making it take longer for you to get a job done. In this case, the RAM needs to be emptied.

A first, very inelegant way to do this could be to restart the computer. This is not always possible and could waste some time as you would have to save the files, close the programs you were working on and then reopen them when the PC is restarted. However, you must know that there is a much faster method thanks to the use of a simple command run as an administrator. Without needing to add anything else, let’s see it together.

  1. Openyour Mac’s terminal .
  2. Type the commandsudo purge and press Enter .
  3. Enter theuser’s password and press Enter .

The procedure is finished. Once the password has been entered and the command executed, the RAM cache will be emptied. In case you want to learn more about the meaning of what you have just typed, the command is sudoused to perform an operation as an administrator, while the command purgeallows you to clear the cache. Simple, isn’t it?

If, on the other hand, you have too many applications that start automatically when you turn on your Mac, find out how to disable their startup and how to prevent it from impacting the startup time of your Apple computer .

Find out  how to know the version of macOS installed on your Mac ,  how to find the Mac model ,  how to find the serial number or how to get information about the battery status .

Do you need to refresh your Mac or do you want to update the operating system? Learn how to do a clean format of macOS .

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment