2023 Mac Mini with Magic Keyboard and Mouse
Image by Apple
Mac Tech

How To Clear Cache On A Mac

Dan King
Dan King

Table of Contents

Is your Mac behaving strangely or running slower than normal?  Maybe one or more of your apps are running slow or "hanging up" at times. Are you concerned with your private information being available for companies to use without your permission?  These are all good reasons to learn to clear the cache on your Mac.

In general, a Mac is very good at taking care of itself.  Apple has built an incredible computer and operating system (MacOS) that is both efficient and effective at general maintenance.  Sometimes you might find that you need to do a little extra work to make sure your desktop Mac or MacBook is running at peak efficiency.

What is Cache?

Cache is data that your computer stores in memory to speed up certain processes. More specifically, it is a small amount of data held in memory that is referred back to in order to speed up processes that have been used recently or are used often.

Cached data is generally stored temporarily in memory that is local to the cache client and separate from the main hard drive. Cache is commonly used by the central processing unit (CPU), applications, web browsers and operating system. Physically, it is stored on a chip on the system board although sometimes disk memory is used as well.

There are three different kinds of cache:

System Cache

System Cache is stored data used by the Operating System (MacOS) to speed up processes.

The system cache can include things like cached web pages, frequently accessed system libraries, and other data that applications use to operate efficiently. By keeping this data cached in memory, the system can quickly retrieve it when needed, rather than having to re-read it from the slower storage devices like the hard drive.

Over time, the system cache can grow in size, which can sometimes cause performance issues. Clearing the cache can help improve performance by freeing up memory and disk space, but it can also cause a temporary slowdown while the cache is rebuilt.

It's worth noting that macOS has built-in mechanisms to manage the system cache, so in most cases, you don't need to manually clear the cache yourself. However, if you're experiencing performance issues, clearing the cache can sometimes help.

Browser Cache

Browser Cache Browser cache refers to a feature in web browsers that stores copies of web pages, images, and other resources that a user has visited on a website. The browser cache is designed to speed up page loading times and reduce the amount of data that needs to be downloaded each time a user visits a website.

When you visit a website, the browser will download various resources such as images, CSS files, JavaScript files, and HTML files. The browser will then store a copy of these resources in its cache so that if you revisit the website, it can quickly retrieve these files from the cache instead of downloading them again. This can greatly reduce the time it takes for a website to load and can save bandwidth.

However, if the cached resources become outdated or corrupted, it can cause issues such as missing images, broken layouts, or outdated information. In these cases, clearing the browser cache can help resolve the issues by forcing the browser to download new copies of the resources from the server.

It's also worth noting that the browser cache can be a privacy concern, as it can store sensitive information such as login credentials or personal data. Most modern browsers have settings to clear the cache automatically or allow you to manually clear the cache when needed.

User App Cache

User App Cache consists of the small files your applications create on your computer while you are using them. These cached files speed things up and remember where you were when you last used that application. These files generally take up a much larger amount of space than system cache files.

User app cache refers to temporary data that is stored by applications on a user's device to help improve performance and reduce the need to re-download data. This cache can include things like frequently accessed images, user preferences, and app settings.

Many applications use caching to speed up the user experience and reduce the amount of data that needs to be downloaded from a server. For example, a social media app may cache images and videos that a user has already viewed, so that the next time the user opens the app, the content can be displayed more quickly.

Over time, the user app cache can grow in size, which can sometimes cause performance issues. Clearing the cache can help free up storage space and potentially improve performance, but it may also cause a temporary slowdown as the app rebuilds its cache.

Many apps have built-in mechanisms to manage their own caches, so in most cases, you don't need to manually clear the cache yourself. However, if you're experiencing issues with an app or are running low on storage space, clearing the cache may help.


How Does Cache Work?

Lets take a quick look at how each of the cache types on your Mac work.

System Cache

When the cache client in your OS tries to access data, it will first check the current cache.  If it finds data there that pertains to the current process, it will pull that data and use it.  This is known as a cache hit.

If there is no data pertaining to the requested process found in the cache (known as a cache miss), the cache client will create that data in the cache.

💡
One thing to keep in mind regarding System Cache is that it can be dangerous to empty or clear this if you do not know what you are doing. For everyday performance issues, the System Cache is NOT what you will want to clear.

Browser Cache

In the case of a web browser, caching is used to improve performance by storing data that will improve performance of websites that are frequently visited.  This cached data is stored on your computers storage media - typically your hard drive. Cookies and search history are things you will frequently find cached in all of the web browsers you use (Safari, Firefox, Google Chrome, Brave).

Application Cache

As mentioned earlier, this is generally a much larger storage of data than system cache.  


Why Empty Your Cache?

Clearing the different types of cache on your desktop Mac or MacBook will clear up valuable space on your hard drive.  Remember, all of the data in your browser cache is downloaded from the internet so you do not always know what is being stored and how long it has been there. Sometimes this data can cause issues such as the following:

  • Application performance issues and crashing - sometimes cahced data can affect the performance of your computer and affect your programs, especially if the data is corrupted.
  • Personal information - the cache holds personal information that you might not want shared any longer with web sites you are visiting.
  • Outdated website information - this can actually cause rendering issues with websites you visit if the information is out of date and the site has been updated with newer data or UI improvements.

How to Clear History in your Browser

To clear the history of websites you have visited in your browser, open the browser you want to clear the history for.  You will have to perform this for each browser you use since it is unique to each.

💡
Clearing History in your browser is not the same as clearing your cache. Clearing your History only deletes the list of websites you have visited. The browser data contains additional files such as cache, images, cookies, passwords, etc.

Sometimes you will only want to clear your history in your browser.  This is how to clear History in Safari:

  1. Open your browser
  2. Click History in your top menu bar
  3. Click Clear History... at the bottom of the menu
Clear History Mac Safari browser

4.  A window will pop up giving you three options for clearing your History.  Here you can choose from four options.  Clearing all history will clear your entire history of visited sites.  Keep in mind, this will NOT clear all of your cache.  It will only clear the list of websites you have visited for a given amount of time.

Clear history for a selected length of time in Safari

How to Clear Browser Cache in Safari

Different and more comprehensive than clearing the History of your browser is clearing the browser cache.  

  1. Open Safari browser
  2. Click Safari --> Settings
  3. Click the Privacy tab
Safari Settings Privacy tab highlighted

4. Click Manage Website Data...

Safari browser Manage Website Data

5. At this point you can scroll down the list and Remove data from the websites you choose, or you can just choose to Remove All.

If you choose to Remove All and clear your entire browser cache, you will be presented with the following warning.   Do not worry about deleting this data as it will be refilled as you browse the web in the future.

Safari Remove All warning

How to Clear Application Cache on your Mac or MacBook

Here is how to clear your Application Cache on your Mac.

  1. Open Finder --> Go
  2. Scroll down and click Go to Folder...
Finder menu Go to Folder option

3.  Type the following:  ~/Library/Caches --> This will bring up the following options:

4.  Click Caches

5.  You will be presented with a list of folders where caches are stored for each application.  Your best option here is to click on a folder and delete only the contents of the folders you want to remove.

💡
Deleting your entire application cache could cause some issues if you do not know what you are doing so it is better to delete only the cache for the application that is causing issues.
Mac library caches folders