Sub topic 10
Clearing user caches in ~/Library/Caches
This chapter assumes you can open Terminal and Finder, know where your home folder and its hidden Library folder are, and have read the earlier chapters on Storage settings, large files, and what caches are. Here you measure the user cache folder, clear it carefully, and check the result.
What lives in ~/Library/Caches
Each app you use can store temporary data in ~/Library/Caches. Most apps put their files in a subfolder named after the app's bundle identifier, such as com.apple.Safari. The data in these folders can be rebuilt. Examples are thumbnails, downloaded web assets, and compiled results.
Deleting a cache does not delete your documents. The cost is speed. The app may start slower or reload content the next time you use it. This is why clearing caches helps most when you are short on space, and does little otherwise.
Two other folders have similar names, and this chapter does not cover them:
/Library/Cachesholds caches shared by all users. Leave it alone./System/Library/Cachesbelongs to macOS and is protected. Never edit it.
Step 1: Measure before you delete
Check the size of the folder first. If it is only a few hundred megabytes, it is not worth the effort.
du -sh ~/Library/CachesTo see which apps use the most space, list the subfolders by size:
du -h -d 1 ~/Library/Caches 2>/dev/null | sort -hr | head -n 10The -d 1 option limits the report to first-level folders. sort -hr sorts human-readable sizes, largest first. 2>/dev/null hides "Operation not permitted" messages for protected folders.
Step 2: Decide what to clear
Work from the largest folders down. Clear the contents of a specific subfolder rather than the whole Caches folder.
Use these rules:
- Quit the app that owns the folder first. An app that is running may recreate the files or crash when they vanish.
- Delete the contents of the folder, not the folder itself. Some apps expect the folder to exist.
- Move items to the Trash instead of removing them with
rm. This gives you a way back. - Skip folders you do not recognize. Search the name before you act.
Step 3: Clear a cache in Finder
- In Finder, choose Go > Go to Folder, type
~/Library/Caches, and press Return. - Open the subfolder for the app you want to clear.
- Select the files inside and move them to the Trash.
- Reopen the app and confirm it works normally.
- Empty the Trash. Space returns only after this step.
Some folders refuse to delete because the system or a running process protects them. Skip these.
Step 4: Verify the result
Run the size check again, and check the free space on the data volume.
du -sh ~/Library/Caches
df -h /System/Volumes/DataFree space may differ from what you expected. Purgeable space and local snapshots, covered in earlier chapters, affect the figure, and the cache folder will grow again as you use your apps.
Common errors
| Symptom | Likely cause | What to do |
|---|---|---|
| "Item is in use" | The app is still running | Quit the app and retry |
| "Operation not permitted" | Protected folder | Skip it |
| Free space did not change | Trash not emptied, or snapshots hold space | Empty the Trash, then check snapshots |
| App is slow on first launch | Cache is rebuilding | Wait. This is expected |
| App lost its settings | You deleted outside Caches | Restore from Trash or backup |
Exercise
You find a 6 GB folder called com.example.editor in ~/Library/Caches. List the steps you would take to clear it safely, and name one thing you would not do.
Show answer
Check that a recent backup exists. Quit the editor. Open the folder and move its contents (not the folder itself) to the Trash. Reopen the editor and confirm it works, then empty the Trash and re-run du -sh ~/Library/Caches and df -h /System/Volumes/Data to verify. Do not delete the whole ~/Library/Caches folder or touch /System/Library/Caches.
Exercise
You cleared a cache and emptied the Trash, but df -h /System/Volumes/Data shows almost no change. Name two possible reasons.
Show answer
The cache was small, so little space was freed. Purgeable space or Time Machine local snapshots may also be affecting the free space figure, or the app began rebuilding its cache.