Apps & cleanup

How to clear cache on a Mac safely

Clearing cache on a Mac means deleting regenerable files that apps store to launch faster. Quit the apps first, remove the contents of ~/Library/Caches (not the folder itself), empty browser caches from each browser's own settings, and flush DNS with sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder. Caches rebuild, so expect the space to return over time.

Updated 2026-10-27

Key points

  • Delete the contents of ~/Library/Caches, never the folder, and quit the apps you are cleaning first.
  • ~/Library/Caches is per-user; /Library/Caches is shared by all users and needs an administrator password.
  • Never delete /System/Library/Caches — those are Apple-managed system caches.
  • Clearing cache is not a permanent space win: apps regenerate it as you use them.
  • Slower first launches and repeated sign-ins after clearing are normal, not damage.

Clearing cache on a Mac means deleting the files apps keep so they can open faster next time. Those files are regenerable, which makes cache one of the safer things to remove. It is not a permanent fix, and a few cache locations should be left alone. This guide covers where cache lives, how to measure it before deleting, and what to expect afterwards.

What a cache actually is

A cache is a local copy of data that is expensive to fetch or compute: decoded images, thumbnails, web assets, API responses. The app reads from the cache instead of doing the slow work again. When the cache is missing or stale, the app rebuilds it.

Where caches live on macOS

LocationWhat it holdsSafe to remove
~/Library/CachesPer-user app cachesYes, the contents
/Library/CachesCaches shared by all accountsUsually, needs admin rights
~/Library/Containers/<app>/Data/Library/CachesCaches for sandboxed appsYes, the contents
Browser profile foldersWeb cache, cookies, site dataYes, via browser settings
/System/Library/CachesApple system cachesNo

The user library holds nearly all reclaimable space. The shared folder is smaller and mostly holds content macOS and installer packages manage.

How to check cache size before deleting

Measure first. Blind deletion is how people lose data they meant to keep.

du -sh ~/Library/Caches/* | sort -hr | head -20

du -sh prints a human-readable total per item, sort -hr orders by size, and head -20 shows the twenty largest. Add 2>/dev/null if permission warnings clutter the output. For the shared folder, run the same command with sudo and /Library/Caches.

If one app dominates the list, check whether you still need its cache. A 20 GB cache usually belongs to a browser or a creative tool — clearing it costs a slow next launch, not lost projects.

How to clear app caches

  1. Quit the apps you intend to clean, including menu bar helpers and background agents.
  2. Open ~/Library/Caches in Finder (Go → Go to Folder, then paste the path).
  3. Move the contents to the Trash instead of deleting the folder. Keeping the folder preserves permissions and expectations.
  4. Empty the Trash once you have confirmed the apps still work.

Browser caches

Clear browser cache from the browser, not from Finder. Safari exposes it under Settings → Privacy → Manage Website Data; Chrome under Settings → Privacy and security → Delete browsing data. Removing browser cache files by hand while the browser is open can corrupt its profile.

Decide separately about cookies. Clearing cached images and files is harmless; clearing cookies signs you out everywhere.

DNS cache

The DNS cache maps hostnames to IP addresses. It is not a file you can browse, and flushing it deletes no data:

sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

Use it when a site resolves to the wrong address, after editing /etc/hosts, or when one domain fails while others load. There is no maintenance benefit to running it on a schedule.

What happens after you clear caches

Expect slower first launches while apps rebuild, repeated sign-ins where sessions lived in cache or cookies, and thumbnails repopulating over the following hours.

Space returns gradually. On a machine in daily use, much of what you deleted comes back as the same apps run again. Cache clearing is a temporary reclaim or a fix for stale data, not a strategy for staying below a storage limit.

What not to delete

  • /System/Library/Caches — Apple-managed system caches; deleting them can break system behavior and is not supported.
  • The ~/Library/Caches folder itself — delete its contents, keep the folder.
  • Caches of apps that are currently running — quit first.
  • ~/Library/Application Support — this is app data, not cache. Removing it loses projects, profiles and databases.
  • ~/Library/Containers — sandboxed app data, including browser profiles and messages.
  • ~/Library/Keychains — passwords and certificates.
  • Xcode Archives — the only copy of shipped builds, not a cache.

Any sudo rm -rf command with a wildcard deserves a second look. A typo in a path can remove an entire library folder, and there is no undo outside your backups.

How Maclean handles caches

Maclean scans known cache locations and lists them with sizes and risk labels, so you can see what each item is before removing it. It never bulk-deletes ~/Library, excludes protected Apple applications, and moves large items to the Trash so they can be restored.

The free CLI covers the same ground without a GUI:

maclean scan --deep
maclean clean --dry-run

--dry-run prints what would be removed and changes nothing; --json gives machine-readable output, and scheduled runs are available through the app. Maclean is Apache-2.0 licensed, runs on macOS and Windows, and knows more than 60 developer cache types in addition to app caches. All scanning happens on the device — file names and paths are not uploaded.

If you want the full picture rather than one category, start with what Mac System Data contains and how to free up space on a Mac. When an app itself is the problem, uninstalling it with its leftovers removes more than cache ever will.

Bottom line

Clear cache by quitting the app, removing the contents of its cache folder, and letting it rebuild. Skip /System/Library/Caches, keep Application Support and Containers untouched, and expect the space to return. Cache clearing solves stale data and buys temporary room; it does not solve a disk that is genuinely too full.

FAQ

Frequently asked questions

Is it safe to delete the cache folder on a Mac?

Delete the contents of ~/Library/Caches rather than the folder itself. macOS and apps recreate cache directories automatically, but removing a folder that an app expects while it is running can make that app misbehave until it is restarted.

Does clearing cache free up space permanently?

No. Caches exist to be rebuilt, so apps recreate them within days or weeks of normal use. Clearing cache is a temporary reclaim of space and a way to fix stale or corrupted data, not a lasting storage solution.

Why is my Mac slower after clearing the cache?

The first launch after clearing is slower because the app has to rebuild its cache from scratch. It should return to normal speed within a few sessions. Repeated sign-ins happen because clearing cookies or browser storage removes saved sessions.

Should I clear the DNS cache on a Mac?

Only when you have a reason: stale DNS results, a changed hosts file, a moved website or connectivity to one specific domain. Flushing the DNS cache is safe and deletes no files, but doing it routinely has no benefit.

Can I delete /Library/Caches as well?

You can remove its contents if you have an administrator password, but it is shared by every account and some entries are recreated only at the next login. Start with your user caches; clear the system-wide folder only when you have identified a specific large item.

Preview first, then clean safely

Maclean breaks down caches, app data, large files and APFS snapshots, and labels the risk of every item before deletion.

Download for Mac→