How to clear RAM on a Mac: tips to free up memory

Macworld

Is your Mac running painfully slowly? Has an application just hung? Did you see a “Your system has run out of application memory” message or the dreaded spinning beach ball? All of these can be signs that your memory (aka RAM or Unified Memory) is being used to the max. Read on to find out how to clear the RAM on your Mac and various helpful tips to help you clean or optimize your Mac memory, including what to do if your Mac RAM is always full.

What is RAM?

First a quick primer. RAM stands for Random Access Memory and it provides storage for ongoing tasks and processes. The difference between the RAM and the rest of the storage on your Mac is that it’s faster, therefore your Mac is designed to keep certain things in RAM in order to speed things up.

Since the introduction of the M1 chip and subsequent Apple silicon in Macs, Apple has referred to RAM as Unified Memory. Unified Memory is shared between the CPU and GPU and can be diverted to where it is required.

Macs ship with a minimum of 8GB Unified Memory, but you can buy Macs with more. 8GB RAM should be plenty if you don’t run memory-hungry applications and games, but even the most average user can come up against RAM issues due to memory-hogging processes associated with badly designed web pages and apps. We have a separate article all about how to tell how much RAM is in your Mac if you aren’t sure how much you have available.

You need to ensure you get enough memory when you buy your Mac because the Unified Memory cannot be upgraded later on. We advise that you get the maximum amount of RAM you can afford when you buy a new Mac – you can do so as a build-to-order option at the point of purchase. You can opt for anything from 16GB RAM to 192GB in the Mac Pro. If your Mac doesn’t have enough memory for your needs you probably need to use a cleaner app, options for which we will discuss below.

PROMOTION

CleanMyMac X | Look inside your macOS

Use CleanMyMac X to find hidden junk and free up the unseen “System” storage. Locate large old folders, background apps, and heavy memory consumers. Tune your Mac for maximum speed, and keep it malware-free and secure.

Get the exclusive offer for Macworld audience – 10% off any CleanMyMac X package.

How much RAM do I need?

Because it is mounted on the chip alongside the CPU and GPU, Apple’s Unified Memory is superior to standard RAM because it is accessible instantly. This should mean that 8GB RAM in a M1 Mac isn’t the same as 8GB RAM in an Intel Mac. In fact, Apple’s VP of worldwide product marketing, Bob Borchers, has claimed “8GB on an M3 MacBook Pro is probably analogous to 16GB on other systems. We just happen to be able to use it much more efficiently.”

However, in our experience, 8GB is still probably too low for most people. Even if you’re not using high-end apps, Safari and Photoshop can use several gigs of RAM. We advise that you get the maximum amount of RAM you can afford when you buy a new Mac. While 8GB Unified Memory should be sufficient for average use, you may find that it is worth investing in the 16GB or 18GB RAM options.

Is not having enough RAM slowing down my Mac?

If your Mac is using the majority of the RAM available you may experience problems such as:

Performance issues

Spinning beach ball

‘Your system has run out of application memory’ message

Lag when typing

Un-responsive apps and apps freezing or crashing

Taking ages to load apps or web pages

If these are issues you are encountering then you might be thinking that you need more RAM in your Mac.

If you have an old Mac and it is possible to upgrade the RAM this might be the solution you need, but we suspect that the RAM in the majority of our readers’ Macs can’t actually be updated. As we said above, if your Mac has an M-series processor there is no way to update the Unified Memory.

But, even if it is possible to add more RAM to your Mac there might be a much simpler solution, so we’d suggest that you try some of the tips below before rushing out and buying more RAM.

If it’s more RAM you want, and you can add more RAM to your Mac, then read How to upgrade the RAM in a Mac

How to free up RAM on a Mac

How can you address your Mac RAM problem if installing more RAM isn’t an option, or you want to attempt to fix the problem first?

One option is to use an app to clear your Mac’s RAM (or Unified Memory). We discuss a number of these options towards the end of this article. If you’d prefer to jump to that section click here: Best apps to clear Mac RAM.

However, before you install more RAM, or resort to downloading an app, there are several things you can do that might free up your RAM and fix your Mac’s memory problems.

Step 1. Restart your Mac

Restarting your computer is the simplest way to free up RAM. There’s a reason why the IT desk always tells you to “turn it off and on again!” Most of the time that will solve your problem. (See: Should I shut down my Mac every night?)

When your Mac restarts it will empty the RAM and any disk cashes, so when it starts up again you should find that things run smoother.

However, restarting your Mac may not be convenient. Perhaps your system has hung and you are afraid of losing unsaved information, perhaps the idea of closing and reopening umpteen apps doesn’t appeal, or maybe you are in the middle of something that you don’t want to interrupt (even if that is the process that is stealing all the RAM).

If you don’t want to restart your Mac what can you do to free up RAM? Read on…

Step 2. Update macOS

This also might not be something you want to do if your Mac is hung and you are in the middle of something, but it’s a good option to try because it’s possible that your problem is related to a known issue with macOS. This is why it’s always worth checking to see if you are running the most up-to-date version of macOS, and updating it if necessary. See: What is the latest version of macOS.

Apple frequently issues updates that include bug fixes and that might solve your problem.

We cover how to update the operating system software on your Mac separately.

Step 3. Check Activity Monitor

Our first port of call when our Mac slows down or an app freezes is to check Activity Monitor. Activity Monitor is an app that comes with your Mac. You can find it in Utilities, or just start typing Activity Monitor into Spotlight (press Command + Space to bring up a Spotlight window).

Activity Monitor will show you how much memory is being used and will help you identify if a particular app is using up more than its fair share of resources.

You can see how your memory is being used in the Activity Monitor window. You’ll see details about each process and app, such as the amount of memory, how many threads, and so on. You can also see extra columns such as Energy Impact (handy if you are on battery power) by right-clicking on one of the column headers.

Select the Memory tab to see details about how much memory each process is taking up, a graph that shows Memory Pressure, and data about Physical Memory, Memory Used, Cached Files, and Swap Used. Next to that is a section for App Memory, Wired Memory, and Compressed.

As for what that all means:

App Memory is what’s actually being used by apps and processes.

Wired memory is what’s been reserved for apps and can’t be freed up.

Compressed is inactive memory that can’t be used by other apps.

That will all add up to the Memory Used figure.

The Cached Files figure represents the unassigned memory that is available to you. (If you are wondering what Swap Used is, it’s the memory being used by macOS, so it’s already accounted for in the Memory Used calculation).

In the Memory Pressure section, you will see a graph that gives an overview of how much pressure your system is under. Ideally, the graph will be green, but if you are short of memory it will be yellow, or worse, red. It is possible that the graph will be red even if it looks like you have lots of memory available, so it can be a good indication of problems.

How to use Activity Monitor to free up RAM

Open Activity Monitor. (Command+Space and type Activity Monitor)

Click on the Memory tab.

Click the Memory column to sort processes by Memory usage. This will make it easier to see which process or app is hogging the RAM.

When you have identified a suspect app, process or webpage, select it and click on Information (i) in the menu. This will give you some information about what is happening, including the memory being used by that particular process. If you want to quit the app in this window just click on Quit.

After clicking Quit you will see a message asking if you are sure you want to quit this process. You can Quit, Force Quit or Cancel. Force Quit could be useful if the app has frozen.

Alternatively, you can shut down a process easily by selecting it in Activity Monitor and then clicking on the X which will force a process to quit. This doesn’t necessarily close the app. If it’s a web page causing issues rather than quit your browser it will just close and reload that page. But if you were to quit a Photoshop process the application itself would close (and you’ll probably see a ‘closed unexpectedly’ warning.

Note: You shouldn’t close a process if you don’t know what it is as it may be required by your Mac.

Step 4. Close suspect applications

If you glanced at Activity Monitor and noticed that certain apps appeared to be hogging resources even though you weren’t using them – maybe you didn’t even realize they were running, you may benefit from closing them down.

Even if you don’t look in Activity Monitor, a quick glance at your Dock could identify a few running apps that you could quit, thereby freeing up some resources. If you look at the Dock you’ll notice that some apps have a dot below their icon – these apps are open.

How to close an application

Right-click or control-click on the app icon in the Dock.

Click on Quit.

Step 5. Check CPU usage

In terms of suspect apps, it’s not always just the RAM that’s being hogged by an app. Sometimes an app might use a lot of processing power, which could also slow things down.

How to check CPU usage in Activity Monitor

Open Activity Monitor.

Click on the CPU tab.

Sort the processes by %CPU by clicking on that column header.

Look for abnormal usage – if an app or process is using a high percentage of CPU it’s probably what is causing the issues.

To quit that app or process select it and click on the (x) in the menu.

Perhaps a kernel_task is running in the background and taking up a lot of the resources. If that is the case you won’t be able to kill that process – this is because a kernel_task represents a collection of operating system processes. The only way to stop a kernel_task is to restart your Mac. However, it may be that the troublesome Kernel_Task is related to a hardware issue that needs addressing, and until you do you may keep seeing this reoccurring problem. In this case, you might want to run an Apple Hardware Test as described here.

Step 6. Check the printer

Have you sent anything to print recently? It’s possible that a big print job is queued up and that has caused your Mac to hang.

Step 7. Purge RAM in Terminal

We don’t recommend this unless you are an advanced user, but you could try opening Terminal and typing in: sudo purge. Then enter the password and wait while inactive memory is cleared.

How to reduce RAM usage on a Mac

Above you will find the fixes for when your Mac is running out of memory, but how do you stop that happening in the first place?

If you are struggling because your Mac doesn’t have a lot of RAM then there are a few things you can do to maximize what is available. This may also help speed up your Mac.

Step 1. Tidy up your Desktop

If your Desktop is cluttered with documents, images, screenshots and the like, it’s worth tiding it up – or at least dragging everything into a folder. This is because macOS treats every icon on your Desktop as if it’s an active window, therefore the more icons you have littered around your Desktop the more memory will be used.  Unfortunately, most things get saved to the Desktop automatically so it will be a case of doing a bit of a clear up from time to time.

Step 2. Fix the Finder

When you open a Finder window what do you normally see? If you see Recents (in older versions of macOS: All My Files) then it’s worth changing this as all the information about the location of the files shown in that view will be stored in RAM.

How to change what the Finder opens on

Open Finder and click on Finder > Preferences.

Under General choose a folder to be shown when you open a new Finder window.

Once you’ve changed this destination you may need to Relaunch the Finder in older versions of macOS. To do this right-click on the Finder icon in the Dock while holding Option/Alt button and choose Relaunch.

Step 3. Close or merge Finder windows

Another Finder-related tip: As each Finder window can have an impact on RAM usage, either close Finder windows that you aren’t using, or merge all the Finder windows together.

In the Finder, click on Window > Merge All Windows.

Step 4. Stop apps starting up automatically

Speaking of apps that might be running in the background and using up resources, do you have apps that seem to be running even though you never opened them? It is possible that you have items in your start up menu, which means that they will open automatically when you start your Mac.

Luckily it is easy to stop some apps from automatically starting up whenever you turn on your Mac.

How to stop apps from starting automatically

Open System Preferences.

Click on Users & Groups.

Click on your User name on the sidebar on the left if that’s not already selected.

Click on Login Items.

Here you may see a collection of applications that will open up every time you start your Mac.

If you don’t need them to always be running, select an app in the list and click on the (-) button.

Step 5. Shut web browser tabs

Websites can be a real memory hog. In recent versions of macOS you will see websites open in Safari listed as separate processes in Activity Monitor, so take a look there to see if there are any memory hogs open on you Mac and close them.

It’s good practice not to have multiple web browser tabs open. Close Safari (or whichever browser you use) from time to time, or at least close the extra tabs that are open – you can do this easily. 

How to close open browser tabs

Our favored way to close open browser tabs in Safari is to:

Right-click on a tab we want to remain open.

Choose Close Other Tabs if you want to close all the other open tabs. 

Alternatively, choose Close Tabs to the right if you want to close those to the right.

If, like us, you have a lot of Pinned tabs in Safari these can also be hogging memory. While these tabs shouldn’t be live all the time, once you have clicked on one it will be kicked into action and may become a background memory hog, so check in Activity Monitor to see if they are. You will be able to close the process there.

How to close websites in Activity Monitor

Open Activity Monitor.

Click on the Memory tab.

Click on the memory-hogging website – you will see an X appear in the menu.

Click on the X.

Confirm that you want to Quit the process.

Step 6. Delete browser extensions

If you have installed web browser extensions it may be that one of them is the RAM guzzling culprit.

How to remove a browser extension from Safari

Open Safari and click on Safari > Preferences in the menu.

Click on the extensions tab.

Choose the extension you want to uninstall.

Click Uninstall.

Step 7. Make sure you have lots of free disk space

If you are running out of RAM your Mac’s drive can be used as virtual memory – so free up some storage space if you are running out of RAM. The recommendation is to keep 20% of your drive space free.

You could delete large unused files, old downloads, and old apps. Follow our advice about freeing up storage space on a Mac.

Best apps to clear Mac RAM

Another option is to download a third-party app that promises to optimize your RAM – we look at some such programs below.

It should be noted that, in general, macOS is capable of managing memory efficiently and deals with logs and cashes and the like itself, so you shouldn’t really need a third-party app to do that for you.

However, if your Mac doesn’t have as much RAM as you’d like, then a third-party app may turn out to be cheaper and less hassle than attempting to add more RAM yourself. If it’s a frequent problem you are encountering then it may well be worth looking at those options.

Here are a few of apps that you could try:

1. Parallels Toolbox

Price When Reviewed:



$24.99 per year, free 7-day trial

Best Prices Today:



$24.99 at Parallels

You probably know Parallels as the company behind Parallels Desktop, the virtual machine software for running Windows on the Mac, but they also make Toolbox, a collection of handy tools that make it really easy to do various things you might want to do on a Mac (Toolbox came about because Parallels’ Help Desk would field calls from Windows users wondering how to do things on a Mac and they decided to simplify the processes).

There are more than 30 tools included in Parallels Toolbox and one of them is a handy Free Memory tool. 

The benefit of Parallels Toolbox is that you also get loads of other handy tools such as Find Duplicates so you can delete things you don’t need and free up space, an easy way to take screenshots and record video, and loads more.  

When we ran the Free Memory tool we regained more than 1GB memory. There’s a free trial available here, or it costs $24.99/£20.99 a year.

Read our full

Parallels Toolbox review

2. CleanMyMac X

Price When Reviewed:



Free

Best Prices Today:



$0 at MacPaw

With CleanMyMac X installed on your system you will get a Heavy memory usage alert if your Mac is running out of free RAM. Just click on the Free Up button to release some of the RAM and speed things up.

With CleanMyMac X installed you will see an icon in the menu bar, which you can click to get access to various tools and clear your RAM there, among other things.

Click on Free Up in the memory section and the software will start to free up your RAM.

There are also options for freeing up storage space.

You can download CleanMyMac X for free, but some of the features require you to pay to unlock the full version. CleanMyMac costs $34.95/£29.95, you can download it here.

3. Memory Clean




Best Prices Today:



$0 at Fiplab

This will purge your Mac’s inactive memory – something you might want to do after closing a particularly intensive app or game. Some features are available via the free app but there is an in-app purchase to gain more tools. When we ran the app it freed up about 1GB without requiring us to pay anything. 

We have more advice about the best Mac cleaners, which do more than free up RAM in a separate article here: Boost Mac performance with one of these top cleaner apps.

Cleaning and Data Recovery Software, Mac, MacOS, Personal Software