Is it safe to delete caches on your Mac?
Updated
In short: Yes, deleting caches is generally safe once the app they belong to has been quit. A cache is temporary storage where an app keeps data it can download or compute again at any time. Deleting it rarely achieves much, though: the app creates the cache again the next time you use it, and according to Apple, macOS clears caches and logs that are safe to delete by itself whenever space is needed. It pays off for single large caches of apps you rarely use or have already deleted.
What is a cache on a Mac?
A cache holds data an app wants to have ready more quickly, such as downloaded images, previews or precomputed content. According to Apple, the Caches folder is only meant for files an app can easily re-create; the app does not need them to work properly, but uses them to be faster. That is why deleting a cache does not remove any of your documents; the app only has to download or compute the content again.
Where are caches stored on a Mac?
Most caches are in the Library, the folder where macOS and your apps keep their settings and data. It is normally hidden in the Finder; the ~ sign stands for your home folder.
~/Library/Caches: the caches of your apps, usually one folder per app. Many folders carry the app's bundle ID, a unique identifier written as a reversed domain name such ascom.company.AppName.~/Library/Containers/<app>/Data/Library/Caches: caches of sandboxed apps. A sandbox is a walled-off area in which an app manages only its own data; according to Apple, apps from the Mac App Store must run in one.~/Library/Application Support/<app>: apps built on Electron or Chromium, meaning apps that are built on the technology of the Chrome browser, such as Slack, Discord or VS Code, keep folders likeCache,Code CacheorGPUCachethere./Library/Caches: caches for all users of the Mac. The folders in it usually belong to the system or to other users; deleting them needs your administrator password.
Does macOS clear caches by itself?
Yes. According to Apple, macOS clears caches and logs that are safe to delete when space is needed on your Mac, such as temporary database files, interrupted downloads, staged updates for macOS and apps, and Safari website data. If you lack space for one particular task, such as a macOS update, Apple names starting up in safe mode as a way to free space temporarily: the Mac clears certain system caches, including font caches and the kernel cache, and creates them again as needed.
- Mac with Apple silicon: turn the Mac off, press and hold the power button until the startup options appear, and select your startup disk. Then press and hold the Shift key and click "Continue in Safe Mode".
- Intel-based Mac: press and hold the Shift key right after turning on or restarting the Mac until the login window appears.
Choose Apple menu > Restart to leave safe mode.
How do I delete a cache by hand?
- First measure which caches are large. Open Terminal, the app for text commands in Applications > Utilities, and enter
du -sh ~/Library/Caches/* 2>/dev/null | sort -h. The command lists the folders by size, the largest at the bottom, and only reads. - Quit the app the large folder belongs to.
- In the Finder, choose Go > Go to Folder, enter
~/Library/Cachesand move only that app's folder to the Trash, not the whole Caches folder. - Open the app and check that it works as usual. According to Apple, the space only becomes available once you empty the Trash.
Browser caches are best cleared in the browser's own settings, in Safari for example by managing website data in the Privacy section.
When does deleting not pay off?
- As a routine: apps create their caches again and have to download or compute the content once more. It does not make your Mac faster; if anything, the apps are slower for a while afterwards.
- For small caches: many folders take only a few megabytes. Large files, unused apps and backups free more, see How to free up storage space on your Mac: 9 ways that work.
Which caches should I not delete?
- No caches of apps that are running: a running app keeps files in its cache open and keeps writing to it. Quit it first.
- Folders starting with
com.apple.belong to macOS and Apple's apps. Leave them alone unless you know exactly what they are for. - Nothing in
/Systemor/private/var: according to Apple,/Systemis on a sealed, read-only system volume, and/private/varholds logs, temporary files and other data that macOS manages itself.
Frequently asked questions
Does clearing the cache make a Mac faster?
Usually not. Caches are meant to speed apps up; after deleting them, apps have to download or compute the content again and are at first slower rather than faster.
Can I delete the whole ~/Library/Caches folder?
It is not advisable. It also holds the caches of running apps and of macOS itself; it is better to delete the folders of single large caches whose app has been quit.
Do I lose data when I delete caches?
Usually not, because according to Apple only files an app can re-create or download again belong in a cache. Your documents are stored elsewhere; the app only has to load some content again.
How often should I clear caches on a Mac?
You do not need to do it regularly, because according to Apple, macOS clears caches that are safe to delete by itself when space is needed. It makes sense for a large cache of an app you hardly use any more.
Faster with SpaceBroom
System Junk in SpaceBroom shows user caches, the caches of sandboxed apps, Electron and Chromium caches and logs with path and size. It skips caches it can link to an app that is running, and checks this again right before removing anything. It always leaves folders that belong to iCloud, CloudKit or HomeKit alone. What you remove goes to the Trash. It does not preselect system caches in /Library/Caches; it deletes them only after your administrator password, and then permanently. Where developer tools keep their caches is in the guide How to clean up node_modules and package caches on your Mac.
More guides
- How to free up storage space on your Mac: 9 ways that workMac storage full? See what takes up space and free it up: the Trash, Downloads, large files, unused apps, old device backups and more.
- System Data on your Mac: what it is and how to reduce itSystem Data taking up many gigabytes? What the category holds, what macOS cleans up by itself and what you can safely remove.
- How to uninstall apps on your Mac completely, with no leftoversDragging an app to the Trash leaves settings, caches and background services behind. Where the leftovers are and how to remove them safely.
- How to clean up DerivedData, archives and simulators on your MacXcode DerivedData, archives, device symbols and simulators: where they are, what you can safely delete and what Apple says to keep.
- How to clean up node_modules and package caches on your Macnode_modules, the caches of npm, Yarn, pnpm and pip, Homebrew and Docker: where they are, how big they get and how to clean them up safely.
- How to find large files on your MacVideos, downloads and old archives often take the most space. How to find large files with macOS Storage settings, the Finder or Terminal.
- How to find and remove duplicate files and photos on your MacDuplicate photos in your library, copies in Downloads and Documents: how to spot duplicates reliably, which copy to keep and where deleting frees nothing.