Inside the Mac Library folder: what is safe to delete
Apple hides this folder for a reason, and the reason is not that it is dangerous. It is that most of it is boring.
There are two Library folders that matter to you, and a third you should leave alone entirely.
~/Library— your account’s. Settings, app data, caches. This is the interesting one./Library— the whole machine’s. Shared by every user, needs an administrator password./System/Library— Apple’s. Sealed, read-only, not your business.
Apple hides ~/Library from Finder by default. To see it, open Finder and press Command-Shift-L, or hold Option while opening the Go menu. To stop hiding it permanently:
chflags nohidden ~/Library
The folders, roughly by how much space they take
Containers is usually the biggest thing in here, and on this Mac it is 13 GB by itself. Every sandboxed app gets one, and inside it is a miniature copy of the whole Library structure. Do not delete a container casually: for sandboxed apps, your actual documents live in there. The safe part is <container>/Data/Library/Caches.
Application Support is where apps keep the data that is not settings and not cache: databases, downloaded content, project files, plugins. Second biggest, usually. Entries here belonging to apps you have uninstalled are pure waste.
Caches is regenerable by definition. Browsers and streaming apps dominate. Safe to clear, with two caveats: quit the app first, and clear one app’s folder rather than the lot.
Group Containers is for apps that share data between themselves — Microsoft Office, and anything with an extension that talks to its parent app. Treat like Containers.
Mail holds local copies of messages and every attachment, if you told it to download them. Change the setting rather than deleting the files.
Developer only exists if you have Xcode, in which case it is probably the biggest folder on your entire disk. DerivedData is build output and always safe to delete.
Mobile Documents is your iCloud Drive, despite the name. Do not delete things here casually — it syncs, so a deletion propagates to your other devices.
Preferences is thousands of tiny .plist files, one or two per app. Almost no space. Occasionally worth deleting a single one when an app is misbehaving, which is the classic “delete the plist and relaunch” fix. Never delete the whole folder.
Logs is diagnostic output. Safe to clear, rarely large.
Saved Application State remembers which windows were open. Safe to clear; you lose window positions.
LaunchAgents decides what starts at login. Small, but the most consequential folder in the list — see below.
Keychains holds your passwords. Leave it alone. If it goes, so do your saved logins, certificates and Wi-Fi passwords.
Look at yours
du -sh ~/Library/* | sort -h | tail -15
That prints your fifteen largest, smallest first. It takes a minute on a full disk. Almost everyone finds one entry they did not expect.
The safe-to-delete list
In descending order of how comfortable I would be doing it without thinking:
~/Library/Caches/<specific app>— with the app quit.~/Library/Logs/*~/Library/Saved Application State/*~/Library/Developer/Xcode/DerivedData/*~/Library/Application Support/<app you have uninstalled>~/Library/Containers/<app you have uninstalled>— after checking there are no documents in it.
The do-not-touch list
Keychains— your passwords.Mobile Documents— iCloud Drive; deletions sync.Preferencesas a whole — every app forgets everything.Application Supportfor apps you still use — this is where the data is, not the cache.- Anything under
/System/Library— sealed, and macOS will ignore you anyway.
Launch agents, the one that bites
~/Library/LaunchAgents contains a .plist for each thing that starts when you log in. Uninstalled apps leave theirs behind, and macOS keeps trying.
ls -la ~/Library/LaunchAgents
Seven entries here. If one names an app you removed months ago, that is a leftover. Unload before deleting:
launchctl unload ~/Library/LaunchAgents/com.vendor.thing.plist
The system-wide equivalents live in /Library/LaunchAgents and /Library/LaunchDaemons. Same idea, but that is also where legitimate system services live, so be certain of what a file belongs to before removing it.
The rule that keeps you out of trouble
If you cannot name the app a folder belongs to, leave it. Reclaiming two gigabytes is not worth an afternoon working out which app stopped launching and why.