Library folder taking up space on Mac: what is safe to delete
The Library folder in your home folder is where apps keep their data, settings and caches, and on many Macs it is larger than Documents and Downloads together. A few parts of it are safe to clear, mainly Caches and Logs. Most of the rest is real app data that should be managed from the app it belongs to.
Never delete the Library folder itself or empty it wholesale. This guide shows how to see what is in it and goes through the large subfolders one by one.
Three Library folders, and the one that matters
A Mac has three folders called Library, and they are easy to confuse.
- /System/Library belongs to macOS. It is protected, and you cannot and should not change it.
- /Library, at the top level of the disk, holds files shared by all users: fonts, plug-ins, some app support files and helpers installed by apps. It is usually modest in size.
- ~/Library, inside your home folder, is yours. It holds what your apps store for your account, and it is the one that grows. The rest of this guide is about this one.
Open it and measure it
Finder hides ~/Library so it is not changed by accident. To open it, click the Go menu in Finder and hold the Option key. Library appears in the list.
Finder does not show folder sizes in a useful way here, so use the command below. It lists every folder in your Library by size, largest last, and it only reads. macOS may ask whether Terminal can access some folders, and protected folders such as Mail and Messages are only measured if Terminal has Full Disk Access.
du -sh ~/Library/* 2>/dev/null | sort -h | tail -15Safe to clear: Caches and Logs
~/Library/Caches holds copies of things apps can fetch or compute again. Quit your apps, open the folder, and move the contents of the large subfolders to the Trash, leaving the subfolders themselves in place. Apps rebuild what they need, so expect slower first launches and expect some of the space to be used again.
~/Library/Logs holds text logs and crash reports. Its contents can go to the Trash. You lose history that only matters when you are diagnosing a problem.
Clearing these two is safe, but it is not a permanent saving. What stays gone is the cache of apps you no longer use.
Look first: Application Support, Containers and Group Containers
These three are usually the largest, and they are not caches. They hold the data apps need in order to be your apps: notes, databases, chat history, downloaded content, game saves, licences, browser profiles.
Use the command below to see which apps are responsible. Then reduce the data from inside that app, for example by removing offline downloads, old projects or chat media in its settings.
The exception is leftovers. When you drag an app to the Trash, its folders here stay behind. If you find a folder named after an app you removed long ago, it can go to the Trash. Check the name carefully, since some folder names are a company or a bundle identifier, not an app name. Leave anything that starts with com.apple alone.
du -sh ~/Library/Application\ Support/* ~/Library/Containers/* 2>/dev/null | sort -h | tail -20Managed by an app: Mail, Messages, Photos and backups
Some folders in the Library are the storage of one Apple app. They are your data, and the app is the only safe way to change them.
- ~/Library/Mail holds your downloaded mail and attachments. Reduce it in Mail by deleting messages and emptying each account's Trash mailbox.
- ~/Library/Messages holds conversations and their attachments. Use Messages, or the Messages row in Storage.
- ~/Library/Application Support/MobileSync holds iPhone and iPad backups. Delete them from Finder with Manage Backups, or from iOS Files in Storage.
- ~/Library/Mobile Documents and ~/Library/CloudStorage hold synced cloud files. Deleting there deletes from the cloud as well.
- ~/Library/Developer holds Xcode build data, simulators and device support files. Much of it can be recreated, and Xcode has its own guide.
Leave alone: small folders that hold everything together
Several folders are tiny and important. Deleting them frees almost nothing and causes real trouble.
- Keychains: your saved passwords and certificates.
- Preferences: the settings of every app. Deleting them resets apps to their defaults.
- Accounts, Cookies, HTTPStorages and similar: sign-in state for apps and websites.
- LaunchAgents: small files that start background helpers. Remove one only when you know which app it belongs to and that the app is gone.
- Anything you do not recognise. An unknown folder is a reason to look it up, not to delete it.
A sensible order of work
Measure first. Clear Caches and Logs. Then take the two or three largest folders in Application Support and Containers and deal with each from inside its app. Then look for leftovers of apps you have removed.
Move things to the Trash and do not empty it straight away. Use the Mac for a day. If nothing is missing, empty the Trash and the space is yours.
Where Diskzy fits
Diskzy maps the whole disk, the hidden Library included, so each of these folders appears with its size. System Data, explained groups them into named parts marked Safe to clear, Look first or Managed by macOS, which is the same distinction this guide makes by hand.
The Clean up tab lists caches and logs with a reason for each item and leaves apps that are open alone. Uninstall removes an app together with its support files, caches, preferences, containers and launch agents, with guards so files shared with another app are not touched. Everything goes to the Trash.
Common questions
- Can I delete the Library folder on my Mac?
- No. It holds your apps' data, your settings and your saved passwords. You can clear parts of it, mainly Caches and Logs, and remove leftovers of apps you no longer have.
- Why is my Library folder so big?
- Because apps store their data there, not in Documents. Chat apps, browsers, mail, phone backups, developer tools and apps with offline downloads are the usual large ones.
- Is it safe to delete ~/Library/Application Support?
- Not as a whole. It contains real app data. Individual folders that belong to apps you have removed can be deleted, after checking the name.
- How do I open the Library folder on a Mac?
- In Finder, open the Go menu and hold the Option key, then choose Library. You can also choose Go to Folder and enter ~/Library.
- What is the difference between Library and ~/Library?
- /Library at the top of the disk is shared by all users. ~/Library is inside your home folder and belongs to your account. The second is the one that grows with use.
Related guides
- Caches~/Library/Caches
- Logs~/Library/Logs
- Application Support~/Library/Application Support
- Containers~/Library/Containers
- Group Containers~/Library/Group Containers
Uninstall guides
See where your Mac's space went
Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.
Try Diskzy for free