Introduction / Why This Is Needed
Cache (temporary files) is a mechanism used by macOS and applications to speed up operations: storing downloaded web pages, thumbnails, and data for quick launching. Over time, these files can accumulate, occupying anywhere from hundreds of megabytes to several gigabytes. Regular cache clearing helps:
- Free up disk space, especially on models with small SSDs.
- Speed up system performance if the cache is corrupted or excessive.
- Resolve application issues (e.g., when a website doesn't update or a program behaves strangely).
This guide will show you how to safely delete user and system cache without harming your data.
Requirements / Preparation
- macOS Version: These instructions are current for macOS Sonoma (14.x), Ventura (13.x), and Monterey (12.x). Paths in older versions may differ slightly.
- Access Permissions: Deleting system cache (
/Library/Caches) requires administrator privileges (the password for an account with admin rights). - Closed Applications: Make sure to close all running programs, especially browsers (Safari, Chrome), messengers (Telegram, Slack), and Adobe applications. This prevents "file in use" errors and potential data loss in these programs' caches.
- Backup: Direct cache clearing doesn't require a backup since these are temporary files. However, for complete peace of mind, you can create a system snapshot via Time Machine.
Step-by-Step Instructions
Step 1: Clear User Cache (Your Account)
This cache belongs only to your user and is the safest to clear.
- Open Finder.
- In the menu bar, click "Go" → "Go to Folder..." or use the keyboard shortcut
Cmd + Shift + G. - In the window that appears, type the path:
~/Library/Cachesand press Enter.~is a shortcut for your home folder (/Users/your_username).
- You will see dozens of folders with names like
com.apple.Safari,com.adobe.*,org.mozilla.firefox. Important: Do not delete the folders themselves, only their contents. - Open each folder, select all files inside (Cmd+A), and move them to the Trash (Cmd+Delete).
- After processing the main folders, you can safely empty the Trash (right-click on Trash → "Empty Trash").
# Alternatively, you can use a Terminal command for a quick cleanup (see Step 3)
# This command deletes ALL contents of the ~/Library/Caches folder
rm -rf ~/Library/Caches/*
Step 2: Clear System Cache (Requires Admin Password)
System cache is used by macOS and applications installed "for all users". Deleting it requires elevated privileges.
- In Finder, press
Cmd + Shift + Gagain. - Enter the path:
/Library/Cachesand press Enter.- Note: There is no
~at the start of the path. This is the root system folder.
- Note: There is no
- The system may prompt for an administrator password. Enter it.
- As in the first step, go into each significant folder (e.g.,
com.apple,com.google,com.microsoft) and delete the files inside, but not the folders themselves. - Pay special attention to the
com.applefolder—this stores the system's own cache. Deleting its contents is safe, but after a reboot, the system will take some time to "rebuild" the cache.
# Terminal command (will require sudo and password)
sudo rm -rf /Library/Caches/*
# Caution! This command deletes EVERYTHING in the system cache. Ensure all applications are closed.
Step 3: Clear Browser Cache (Safari, Chrome, Firefox)
Browser cache is often the largest. It's best to clear it through the browser's own settings.
For Safari:
- Open Safari → Settings (or Preferences) → the "Advanced" tab.
- Click the button "Manage Website Data...".
- In the list that appears, you can select specific sites or click "Remove All".
- Click "Remove" and confirm.
For Google Chrome:
- Open Chrome → Chrome Settings (three dots in the top right) → "Privacy and security" → "Clear browsing data".
- In the dialog, select a time range (e.g., "All time").
- Check only the box for "Cached images and files" (uncheck history, cookies, etc., if not needed).
- Click "Clear data".
For Mozilla Firefox:
- Open Firefox → Settings (three lines) → the "Privacy & Security" section.
- Under "Cookies and Site Data", click "Clear Data...".
- Ensure "Cached Web Content" is selected (uncheck "Cookies" if you don't want to delete them).
- Click "Clear".
Step 4: Verify the Result
- Click the Apple menu (top left) → "About This Mac".
- Click the "Storage" tab (or "Disk Space" in older versions).
- The system will start recalculating disk usage. This can take up to 2 minutes.
- Once finished, look at the "Storage" section or graph. You'll see how much space was freed (the "Other" or "System Data" category may shrink). If you just cleared the cache, a restart might be needed for the system to update the display accurately.
Potential Issues
- "Operation not permitted" or "No access" when deleting files in
/Library/Caches: You are trying to delete system cache without admin rights. Use Finder with password entry (the system will prompt) or thesudocommand in Terminal. - Files reappear immediately after cleanup: This is normal. Some applications (especially browsers or Adobe Creative Cloud) are actively running and recreate cache files right after deletion. In this case, clearing via the application's settings (see Step 3) is more effective.
- Application runs slowly or won't open after cleanup: In rare cases, corrupted cache might have been a temporary workaround for a problem. The application will run slowly on first launch while it rebuilds its cache. If the issue doesn't resolve within 10-15 minutes, the problem likely isn't the cache.
- Cannot delete the
com.applefolder in system cache: This folder may be protected by System Integrity Protection (SIP). Do not force-delete it. Clearing the contents of other folders is sufficient. SIP protects system files from accidental modification. - Very little space freed (less than 100 MB): Your cache was likely already relatively clean. Either the main volume is taken by browser cache (which needs separate cleaning in Step 3), or the primary issue lies in other file types (old downloads, duplicates, unused apps). Use the built-in storage recommendations (Apple → About This Mac → Storage → "Manage...").
After completing these steps, you will not only free up space but may also resolve some hidden performance issues on your Mac. Performing this cleanup every 1-2 months is recommended to keep your system running smoothly.