Introduction / Why This Is Needed
Cache (cache files) are temporary data that macOS and applications save to speed up operations. Over time, the cache can occupy gigabytes of space and slow down the system. Clearing the cache helps:
- Free up disk space, especially on models with small SSDs.
- Speed up the system and applications if the cache is corrupted or too large.
- Resolve issues with certain applications (e.g., browsers) that behave strangely due to outdated cache.
In this guide, you will learn how to safely clear the cache on macOS using built-in tools.
Requirements / Preparation
Before you begin, make sure:
- You have administrator account access (deleting system caches may require a password).
- A backup is not mandatory but recommended (via Time Machine) in case important files are accidentally deleted.
- You have an up-to-date version of macOS (this guide is relevant for macOS 12 Monterey and newer).
- Close all essential applications, especially those actively using the disk (e.g., video editors).
Step-by-Step Instructions
We will cover three main ways to clear the cache: via Finder (user caches), via Terminal (for advanced users), and clearing browser caches.
Method 1: Clearing User Cache Files via Finder
This is the simplest and safest method. User caches are stored in the ~/Library/Caches folder.
- Open Finder.
- From the menu, select Go → Go to Folder… (or press
Cmd+Shift+G). - Enter
~/Library/Cachesand click Go. - You will see a list of folders, each corresponding to an application or service.
- Select all contents (
Cmd+A) and move them to the Trash. - Empty the Trash (right-click → Empty Trash).
⚠️ Important: Do not delete the
Cachesfolder itself, only its contents. Also, avoid folders withcom.applein their names—they may contain system caches that require a password.
Method 2: Clearing System Cache Files (Requires Password)
System caches are stored in /Library/Caches. Deleting them requires administrator privileges.
- Open Finder and navigate to
/Library/Caches(via Go → Go to Folder…). - Enter
/Library/Cachesand click Go. - Select all files and folders inside (except the
Cachesfolder itself) and move them to the Trash. - When prompted, enter your administrator password.
- Empty the Trash.
💡 Tip: If you don't want to delete system caches manually, skip this step—user caches are usually sufficient for significant space recovery.
Method 3: Clearing Browser Cache
Browsers accumulate large amounts of cache (images, scripts). Clearing it will speed them up and fix site display issues.
Safari
- Open Safari.
- From the menu, select Safari → Settings… (or
Cmd+,). - Go to the Advanced tab.
- Click the button Remove all website data (or Clear Cache in older versions).
- Confirm deletion.
Google Chrome
- Open Chrome.
- From the menu, select Chrome → Clear Browsing Data… (or
Cmd+Shift+Delete). - In the window that appears, set the time range to All time.
- Check Cached images and files (and others if needed).
- Click Clear data.
Mozilla Firefox
- Open Firefox.
- From the menu, select Firefox → Settings (or
about:preferences). - In the Privacy & Security section, click Clear History….
- Select Cache and click OK.
Method 4: Clearing Cache via Terminal (For Advanced Users)
If you prefer the command line, you can use Terminal.
- Open Terminal (via Launchpad or Finder → Utilities).
- To clear user caches, run:
This command recursively deletes all files and folders insiderm -rf ~/Library/Caches/*Caches. - To clear Safari cache (if you use it), you can also delete:
rm -rf ~/Library/Caches/com.apple.Safari - Enter your administrator password if prompted (for system caches).
⚠️ Caution: The
rm -rfcommand permanently deletes files. Ensure the path is correct. Do not runrm -rf /or similar.
Method 5: Using Third-Party Utilities (Optional)
Applications like CleanMyMac X, OnyX, or DaisyDisk simplify cache clearing and other optimizations. They provide safe interfaces and can remove only unnecessary files. However, these utilities are not free (except OnyX). If you don't want to delete files manually, this option may be convenient.
💡 Tip: When using third-party utilities, carefully review what they delete to avoid losing important data.
Verifying the Result
After clearing the cache, check that disk space has been freed:
- Open Disk Utility (via Launchpad or Finder → Utilities).
- Go to the Storage tab.
- Wait for the calculation and see how much space the Caches section occupied (it should decrease significantly).
Also, check system performance: applications should launch faster, browsers should load pages quicker (the first launch after clearing may be slightly slower as the cache rebuilds).
Potential Issues
Access Error When Deleting System Caches
If you see an "Operation not permitted" error when trying to delete files in /Library/Caches, ensure you are logged in with an administrator account and enter the password when prompted.
Deleting Important Files
Although cache files are usually non-critical, some applications store settings or temporary data there that might be needed. If an application behaves incorrectly after clearing, try restarting it or restoring files from the Trash (if you haven't emptied it).
Cache Not Fully Deleted
Some applications (e.g., Adobe Creative Cloud) store cache in other locations (e.g., ~/Library/Application Support). Complete cleanup may require manually deleting cache from these folders. Refer to the specific application's documentation.
Restart Doesn't Help
If the system still runs slowly after clearing the cache, the problem may lie elsewhere (e.g., insufficient RAM, disk fragmentation, too many startup items). Use other macOS optimization guides.