Storage · Library
Is it safe to delete the Library folder on a Mac?
No. Never delete the Library folder itself: your home folder's Library (~/Library) holds your apps' data and settings, your mail and messages, and your saved passwords, and macOS and your apps expect it to be there. Some folders inside it can be cleared. Caches holds data apps rebuild by themselves, and Logs holds diagnostic files. The rest, such as Application Support, Containers and Preferences, is your apps' real data, so remove a folder there only when you know which app owns it and that app is gone.
How to open the Library folder
Your Library folder is hidden in Finder, which is a hint about how much you should touch it. Apple gives two ways in:
- In Finder, open the Go menu, press and hold the Option key, and choose Library.
- Or choose Go → Go to Folder (Shift-Command-G) and type
~/Library.
There are three folders called Library on a Mac, and only one of them is yours. ~/Library, inside your home folder, holds your own apps' data and settings. /Library, at the top of the disk, holds things shared by every user on the Mac, such as fonts and printer drivers. /System/Library belongs to macOS and is read-only. This page is about the first.
What each folder holds, and whether to clear it
Apple's descriptions, with what that means for deleting:
- Caches: "cached data that can be regenerated as needed." Apps must not rely on it, so its contents can go. Quit your apps first, and expect them to be a little slower the first time while they rebuild it. See how to clear the cache on a Mac.
- Logs: log files for apps and system services, the ones Console shows. Only useful when you are chasing a bug. See log files.
- Application Support: "all app-specific data and support files." This is where apps keep your work: libraries, profiles, databases, downloaded content, and iPhone and iPad backups (in MobileSync). Not a cache. See Application Support.
- Containers and Group Containers: "the home directories for any sandboxed apps", which is every Mac App Store app and many of Apple's own. A container is that app's own Library, with its documents and settings inside. Deleting the container of an app you still use resets it, or loses what it held.
- Preferences: your settings, mostly one file per app. Small, so there is no space to gain, and removing one resets that app.
- Mail and Messages: your mailboxes and your conversations with their attachments. Clear these from Mail and Messages themselves, not in Finder: see Mail taking up space and Messages taking up space.
- Keychains: where macOS keeps your saved passwords. Leave it alone.
- Developer: data used by Xcode and other developer tools, often the biggest folder on a developer's Mac. See Xcode DerivedData and iOS simulator runtimes.
Why the Library folder gets so big
Because almost everything your apps keep, other than the documents you save yourself, lives in it. To see which folders are the big ones, open Terminal and run:
du -sh ~/Library/* 2>/dev/null | sort -h | tail -15The largest folders are listed last. Some folders, such as Mail, Messages and Safari, report nothing unless Terminal has been given Full Disk Access in System Settings → Privacy & Security, so a quiet result is not proof a folder is small. The usual heavyweights are Application Support (an old iPhone backup alone can be tens of gigabytes; see iOS backups), Containers, Caches and Developer.
When Library/Containers is huge
Containers grows with the apps that live in it. To see which ones:
du -sh ~/Library/Containers/* 2>/dev/null | sort -h | tail -10The folders are named by bundle ID, such as com.apple.mail, which tells you the app. If the app is still installed, the space is its data: clear it from inside the app, or accept it. If the app is gone, its container is a leftover, and leftover files after uninstalling shows how to check that before you remove it. What was in a container is gone once you empty the Trash.
What not to do
- Don't delete
~/Libraryor empty it. Apps lose their data and settings, and macOS can't put it back. - Don't clear whole folders by command, such as everything under Application Support. Some of what is there is the only copy.
- Don't move Library to another drive. Apps look for it in your home folder.
- Do move what you remove to the Trash, not delete it outright, and empty the Trash only once your apps have been opened and work.
Where the app comes in
RefreshYourMac measures the Library folder in parts, each with its own safety level, so you never act on the folder as a whole. Application Caches (~/Library/Caches) and System & App Logs (~/Library/Logs) are rated Safe for auto removal. Sandboxed App Caches clears only the cache inside each container and keeps the rest. Data Left by Removed Apps lists a container only when the app that owned it is no longer installed, rated Review before deleting, and moves what you choose to the Trash. App Containers is rated Backup recommended, with no bulk clean, and Application Support is shown for its size and never deleted. The two cache and log categories are in both editions; in the Mac App Store edition they work once you allow the folder in Settings → Folders. The container categories are in the download edition only. For what else fills a Mac, see how to free up space on a Mac.
What to do next: see these numbers for your own Mac. Download RefreshYourMac free, or get it on the Mac App Store.
What it costs to have an app do this
| RefreshYourMac | CleanMyMac | MacKeeper | |
|---|---|---|---|
| Pay once | $24.99 | €119.95 on MacPaw’s store; $89.99 for CleanMyMac X on the Mac App Store | subscription only |
| Yearly | $14.99 a year, first 7 days free | $39.99/yr; €19.91/yr for the cleaning-only Essential Trio | €71.40 for the first year, 1 Mac. Their page shows it against a €119.40 list price |
| Monthly | $1.99 a month | $9.99/mo | €10.95/mo |
| Account needed | No | Yes | Yes |
Before you pay anything, both versions give you 3 free scans. CleanMyMac and MacKeeper prices read from their own pages and the Mac App Store on 27 October 2026; the full comparison is at RefreshYourMac vs CleanMyMac and MacKeeper.
Frequently asked questions
Is it safe to delete the Library folder on a Mac?
No. ~/Library holds your apps’ data and settings, your mail and messages, and your saved passwords, and macOS and your apps expect it to be there. Some folders inside it can be cleared: Caches holds data apps rebuild themselves, and Logs holds diagnostic files.
How do I find the Library folder on a Mac?
It is hidden. In Finder, open the Go menu, hold the Option key and choose Library. Or choose Go → Go to Folder (Shift-Command-G) and type ~/Library.
Why is my Mac’s Library folder so big?
Almost everything apps keep, other than the documents you save yourself, lives in it: Application Support (including old iPhone backups), Containers for sandboxed apps, Caches and, on a developer’s Mac, Xcode’s Developer folder. In Terminal, du -sh ~/Library/* | sort -h lists the folders by size.