Safari and Chrome: The Browser Caches You've Never Cleared
Safari and Chrome can hold gigabytes per profile in HTTP cache, service workers and site data. Where each one lives and the commands to clear them.
Browser storage settings show you a number, but it’s usually wrong — or at least incomplete. Both Safari and Chrome maintain several categories of on-disk data that don’t show up cleanly in the in-browser storage UI, and developers specifically accumulate more of it than average through DevTools usage.
Safari
Safari’s cache lives under your user Library, split across a few purposes:
du -sh ~/Library/Caches/com.apple.Safari
du -sh ~/Library/Safari/LocalStorage
du -sh ~/Library/WebKit/com.apple.Safari
~/Library/Caches/com.apple.Safari is the standard HTTP resource cache — images, scripts,
stylesheets fetched by sites you’ve visited. Safe to clear via Safari → Settings → Advanced →
Show features for web developers, then Develop → Empty Caches, or from the shell:
rm -rf ~/Library/Caches/com.apple.Safari
~/Library/WebKit/com.apple.Safari is larger and less obvious — it holds IndexedDB, Service
Workers, and per-site storage for every website that’s ever registered a service worker in your
browser, which by now is most of them. This is the one that actually grows to multiple gigabytes on
a browser that’s several years old and never been cleared:
rm -rf ~/Library/WebKit/com.apple.Safari/WebsiteData
For a scoped clear instead of clearing everything, Safari → Settings → Privacy → Manage Website Data lists every site with stored data and its approximate size, sortable — useful for spotting one site (often a web-based email client or a SPA-heavy dashboard) responsible for an outsized share.
Chrome (and every Chromium browser: Edge, Arc, Brave)
Chrome’s profile directory holds the same categories, in a layout every Chromium-based browser shares:
du -sh ~/Library/Application\ Support/Google/Chrome/Default/Cache
du -sh ~/Library/Application\ Support/Google/Chrome/Default/Service\ Worker
du -sh ~/Library/Application\ Support/Google/Chrome/Default/IndexedDB
If you use multiple Chrome profiles, each one has its own full copy of this structure under
Profile 1, Profile 2, and so on rather than Default — check chrome://version while using a
given profile to confirm which folder it maps to.
chrome://settings/clearBrowserData handles this safely from inside the browser, letting you scope
the clear to cache only (leaving cookies and login sessions intact) — generally the better choice
over a raw rm -rf, since deleting the profile folder while Chrome is running can corrupt the
profile database rather than just clearing the cache.
The developer-specific multiplier: DevTools cache
If you work on web projects, Chrome DevTools’ own Application → Storage cache and the
Network tab’s disk cache both grow specifically because of local development — every
localhost:3000 reload during active frontend work writes to the same per-origin storage buckets as
any other site, and localhost origins are exactly as persistent as production ones. A machine used
for frontend development for a few years commonly has multiple gigabytes attributed to localhost
and 127.0.0.1 alone, sitting in the same IndexedDB/Service Worker structure as everything else.
# From DevTools console, per-origin, or via chrome://settings/content/all
# to see every origin with stored data and clear individually
What’s actually safe here
Cache and Service Worker data: always safe, the site’s next visit rebuilds it. IndexedDB is the one to check before clearing broadly — some web apps (Notion’s web client, certain email clients, PWAs you’ve installed) use it as genuine local-first storage, not just cache, and clearing it can mean losing drafts or offline data that never synced to a server. When in doubt, clear per-site through the browser’s own storage management UI rather than deleting the whole IndexedDB folder blind.
DevCruft, a free Mac app for developers that we’re building, is being designed to show browser cache and WebKit/Chromium storage right alongside every developer tool cache on your disk, so “browser storage” stops being a mystery separate from everything else eating your space. Until it’s ready, the tools above are free and they work. Join the waitlist if you’d like to hear when it launches.
For the Electron apps that embed this same Chromium engine under a different name, see the Slack and Discord disk usage guide.