What is safe to delete in the Library folder?

Updated

Short answer

Caches and Logs are mostly safe to clear. Application Support, Containers, Mail, Messages and Keychains hold your data or settings, so leave them unless you know which app owns the folder and no longer need it.

How to open ~/Library

In Finder choose Go > Go to Folder (Command-Shift-G), type ~/Library and press Return. You can also hold Option and open the Go menu, which adds Library to it.

Folder by folder

Folder What it holds Safe to clear? If you do
Caches Temporary copies apps keep to run faster Usually yes, with the app closed The app rebuilds them; the next launch may be slower
Logs Diagnostic records Yes Nothing, unless you need them for a bug report
Saved Application State Which windows were open when an app quit Yes Apps reopen without their old windows
Preferences App settings Only for an app you removed The app starts with default settings
Application Support An app’s own data, such as projects and databases Only for an app you removed You can lose data the app needs
Containers Data of sandboxed apps Only for an app you removed You can lose that app’s data
Group Containers Data shared between apps from one developer No, unless the whole family is gone Other apps may lose data
LaunchAgents Background jobs that start at login Only for an app you removed The job stops running
Mail, Messages, Safari, Keychains Your mail, messages, browsing data and passwords No You can lose data that is hard to recover

/Library and /System

The Library at the top of the disk (/Library) and the /System folder belong to macOS and to apps installed for all users. Leave them alone. System Integrity Protection blocks changes to /System for a reason, and deleting from /Library by hand is a common way to break an app.

Back up first

Before you remove anything from your Library folder, make sure Time Machine or another backup is current. If something goes wrong you can restore the folder. Moving a folder to the Trash and waiting a few days, rather than emptying the Trash at once, gives you time to notice a problem.

Where to go next

For the folder that grows the most, read whether it is safe to clear cache. For app leftovers, see how to uninstall apps completely, and for the grey bar in Storage, what System Data is.

What JunkTrace does differently

JunkTrace sorts what it finds into three groups: items that rebuild themselves and are removed at once, items held for 7 days so you can put them back, and items that are your call and never preselected. Nothing is removed until you press Clean.

Related guides