Your Mac's Library Folder Is Huge. Can You Delete It?
~/LibraryNo, don't delete the ~/Library folder itself. It holds the settings, saved data, and support files for macOS and every app you use, and gutting it wholesale means broken apps, lost logins, and lost data. The good news: a huge Library folder is normal, and the actual space hogs are a few subfolders you can clean safely. This page shows you which ones.
What it is
~/Library is the hidden folder in your home directory where macOS and your applications keep everything that isn't a document: preferences, caches, logs, extensions, saved application state, mail databases, message attachments, iPhone backups, and the local copy of iCloud Drive. Apple hides it in Finder on purpose, because almost nothing in it is meant to be edited by hand. Every app you install adds its own pile, and most apps never clean up after themselves.
It grows for boring reasons. Caches fills up as apps store downloaded data so they don't have to fetch it again. Application Support collects app databases, downloaded content, and whatever else a developer decides to stash there. Containers and Group Containers hold the sandboxed data of App Store apps, while Mail and Messages keep their databases and years of attachments in their own folders here. Add an old iPhone backup or two under MobileSync and a synced iCloud Drive under Mobile Documents, and a Library folder of 20 to 50 GB or more is completely ordinary on a Mac that has been in use for a few years.
Is it safe to delete?
Deleting ~/Library wholesale is the fast way to break your Mac. macOS reads and writes files there constantly and may refuse to let you trash it while you're logged in. If you forced it, every app would lose its settings and local data: browser profiles, mail, messages, license activations, game saves. Some of that syncs back from the cloud. A lot of it does not.
The right move is to treat ~/Library as a building, not a box: go inside and clean specific rooms. Caches is the safest target and often the biggest. Logs is usually small, but it's free space. Old iPhone backups under Application Support/MobileSync can run several gigabytes each. Folders in Application Support left behind by apps you uninstalled long ago are fair game too. Diskmack identifies the safe-to-clean folders inside ~/Library automatically and skips the ones that hold your data.
How to check its size
In Finder: Finder hides ~/Library by default. Choose Go > Go to Folder (Command-Shift-G), type ~/Library, and press Return. Once inside, press Command-I with nothing selected and wait for Get Info to finish counting the whole folder. For a per-subfolder breakdown, open the folder in list view and choose View > Show View Options, then check Calculate all sizes.
In Terminal:
du -sh ~/LibraryThe ~ expands to your home folder. To rank the subfolders by size, run du -sh ~/Library/*/ | sort -rh | head -20. A few lines may say Operation not permitted; that's macOS privacy protection on certain folders, not a problem you need to fix.
How to clean it
- Quit your open apps, then in Finder choose Go > Go to Folder and type ~/Library.
- Open the Caches subfolder, select everything inside it (Command-A), and move it to the Trash. If Finder says an item is in use, skip that one. Apps rebuild what they need.
- Go to ~/Library/Application Support/MobileSync/Backup and look for old iPhone or iPad backups. Each folder there is one backup, named with a long string of letters and numbers; check its Date Modified for age, then trash the ones for devices you no longer own or that back up to iCloud now.
- Skim ~/Library/Application Support for folders named after apps you uninstalled long ago. Those leftovers are safe to trash.
- Open ~/Library/Logs and delete its contents if it has grown. Log files are safe to remove.
- Leave Preferences, Keychains, Mail, Messages, Containers, and Mobile Documents alone unless you know exactly what you're removing.
- Empty the Trash to actually reclaim the space.
Never trash the ~/Library folder itself, and don't drag whole structural subfolders like Containers or Preferences to the Trash. Clean contents, not structure.
Will it come back?
Parts of it come back, and that's by design. Caches refills as you use your apps, usually within days, though it rarely returns to its old peak right away. Logs regrows slowly. Application Support only regrows where the owning app is still installed and still hoarding. iPhone backups return the next time you back a device up to this Mac. If disk space stays tight, expect to repeat the Caches and backup sweep every few months.
Common questions
Why can't I see the Library folder in Finder?
Apple hides it by default. Press Command-Shift-G and type ~/Library, or hold the Option key while opening Finder's Go menu and Library appears in the list. To keep it visible permanently, open your home folder, press Command-J, and check Show Library Folder.
Is ~/Library the same as /Library and /System/Library?
No. ~/Library is yours and holds per-user app data. /Library holds system-wide data shared by all users, and /System/Library belongs to macOS itself and is protected. The cleaning advice on this page applies to ~/Library only; leave /System/Library completely alone.
What are usually the biggest things inside ~/Library?
On most Macs: Caches, Application Support (especially MobileSync iPhone backups), the Mail and Messages folders (years of attachments), Containers and Group Containers (sandboxed app data), and Mobile Documents, which is the local copy of iCloud Drive. Sizes vary wildly by how you use the machine, so measure yours with du or Get Info before deleting anything.
Terminal says Operation not permitted when I run du on ~/Library. Is something broken?
No. macOS blocks Terminal from reading a few protected subfolders until you grant it Full Disk Access in System Settings > Privacy & Security. Grant that if you want exact totals, or accept a slightly undercounted number; the big cache folders are readable either way.