Every day you open applications and websites in your Mac. In order to access the apps and websites faster, your Mac will cache the content in local storage. Later, when you open the same app or site, Mac will use the cached content instead of downloading through internet again. It helps to reduce the network usage and improve the performance of your Mac. However, these temporary cached files can create problems instead of improvements and in this article we will explain how to clear Mac cache to delete the temporary files.
Related: How to delete temporary files in Windows PC?
Problems with Caching
Mac uses different types of caching and below are some of the reasons you want to delete the cached files or disable content caching.
- In Safari, cached websites may load outdated content even though the original webpage is updated. This may annoy you especially if you doing some web development work or testing with Safari.
- Cached content keep the data from old deleted apps which you do not need at all. Caching can accumulate large junk of data and reduce your storage space available for other purposes.
- Corrupted cache can affect the performance of your Mac and reduce the speed.
Deleting temporary cached files will not affect working with apps or opening website. Therefore, you can safely get rid of the junk data and your Mac will again cache the latest content when start working.
Clearing Mac Cache
There are three ways to clear cached content on your Mac:
- Clear Safari cache
- Delete cached files
- Flush DNS caching
In addition, you can permanently turn-off content caching that Mac uses to store app updates on the local storage.
1. Clear Safari Cache
- Open Safari and click “History > Clear History” menu.
- Select “all history” and click on “Clear History” button to clear the history files stored in Safari.
- In order to only delete the cached website files, you have to first enable “Develop” menu.
- After that go to “Develop > Empty Caches” option.
- This will only delete the stored website cache and not content related to other history.
2. Delete Cached Files and Folders
Follow the below instructions, if you want to cleanup the temporary files cached on your Mac.
- Open Finder app and go to “Go > Go to Folder…” option. Alternatively, press “Command + Shift + G” keys to open the pop-up.
- Type ~/Library/Caches in the text box and press “Go” button.
- This will take you to the cache folder where you can check all cached content in your Mac. As you see in the below screen, it accounts for 2.92 GB local storage.
- Press “Command + A” to select all the files and folders.
- Now, press “Command + Shift” keys to permanently delete these files.
- Click “Confirm” on the pop-up to delete all the files.
- If you are using some apps or files, then Mac will throw a warning message like below. Click “OK” to stop the deletion process and you can quit all the apps to try deleting the files again.
Remember, deleting cached content will not delete Safari history data. You have to delete the history as explained in the above method.
3. Flush DNS Cache
Besides the cached content, Mac also stores the DNS history so that it can use the details when you open the same websites. Follow the below instructions to delete or flush the DNS cache. This can help you to resolve the problems when you have trouble in accessing specific websites.
- Press “Command + Spacebar” to open Spotlight Search box.
- Type “Terminal” and open the app. Alternatively, you can click on Launchpad and go to “Other > Terminal”.
- Enter the below command and hit enter.
sudo killall -HUP mDNSResponder
- You will be prompted to enter the admin password.
- There will be no success message but the DNS cache is flushed on your Mac now.
Related: How to flush DNS cache in Windows PC?
Disabling Content Caching in Mac
Content caching helps Mac to store system and app updates and use next time when you are updating. If you do not want Mac to locally store the content cache, you can disable it permanently.
- Click on “Apple Menu” and go to “System Preferences > Sharing” section.
- Click on the lock icon and unlock the screen with your administrator password.
- After that, select “Content Caching” option and turn it off.
Since system and app updates can be larger in size, you can turn this option off to save storage space in your Mac. Alternatively, you can click on the “Options” button and allocate certain storage size for content caching. By default, Mac will use unlimited storage option and you can reduce to certain size so that you will not run out of storage.
Remember, this will not affect other caching and you have to delete the caches folder in order to get rid of temporary files.
Leave a Reply
Your email is safe with us.