In your Home directory, you have a folder called Library. It’s a useful folder, chock full of files that can get you out of jam or customize your Mac in ways that would otherwise not be possible.
There’s only one problem: If you open your Home directory, you won’t see the folder listed. This is old news for many TMO readers. It’s been this way since OS X Lion (10.7), when Apple first decided to make the folder invisible. Presumably, their intent was to prevent uninformed users from mucking around in the folder, perhaps making a situation worse rather than better. It’s a reasonable concern. And Apple’s move is working out reasonably well. I would bet that the majority of Mac users today aren’t aware that this Library folder exists — and yet they remain content with their Macs.
Still, there are good reasons to circumvent the Library folder’s invisibility cloak and begin an exploration of what’s inside. There are numerous ways to accomplish this. The simplest is to hold down the Option key while accessing the Finder’s Go menu. Locate the now-listed Library item and select it. Once there, you can optionally add the folder to the Places sidebar of Finder windows, making it even easier to return to Library. If you prefer to have the folder itself visible at all times, you can do so via a command in Terminal, as covered in this TMO article.
Once you’re in, it’s time to begin your tour. Here are six of my favorite things to do with stuff inside the Library folder:
1. Modify Preferences
For long-time Mac users, the Preferences folder is probably the most familiar reason to visit the Library folder. Inside Preferences are a collection of files that typically end in .plist. These files contain the customized settings for your apps. Sometimes, a problem with an app can be solved by deleting its .plist file, allowing the app to generate a new default one. Other times, you can add or modify “secret” preference settings by editing an app’s .plist file.
The possibilities of what you can do with .plist files are too many to begin to cover here. In some cases, as I already pointed out, all you need to do is delete a .plist file. For example, to fix problems with System Preferences not saving changes you make, try deleting com.apple.universalaccess.plist.
Or how about this? In a recent column, I lamented that Mountain Lion apps that support iCloud always save to iCloud by default; there is no visible option to modify this. However, you can accomplish the default change by editing a .plist file in your Library folder. The file is: .GlobalPreferences.plist. Because of the dot at the front of its name, this file is itself invisible in the Finder. So you won’t see it in a list of items in ~/Library/Preferences. That’s why the modification is typically done via the Terminal app. However, you can alternatively access the file in the Finder by temporarily making invisible files visible (something which itself is done via a change to a .plist file)!
2. Delete cache files
Cache files are stored in the Caches folder of your Library folder. These files typically contain data that are only needed temporarily. As such, they can usually be deleted without any negative consequence. Doing so can solve certain app-related problems, speed up your Mac or simply free up disk space.
This doesn’t mean you should summarily delete files here. I generally wouldn’t do so without some guidance. However, if you come across a reliable website that recommends deleting certain cache files for some issue you are having, give it a try. You can drag cache files from the folder to the Trash. Or you can alternatively use third-party utilities that have options to delete cache files (such as Onyx) to simplify the process.
3. Troubleshoot via Application Support
The Application Support folder, inside the Library folder, is where you’ll find files that are required for the normal running of apps but are not contained within app itself. For example, if you use any Adobe apps, such as Reader, Air, Flash and Photoshop Elements, you’ll find an Adobe folder here. It contains an assortment of subfolders and files used by whatever Adobe software you have installed. These files are placed in the folder when you install, or first launch, the relevant application.
Occasionally, you’ll read an article that advises to delete or modify a file here, typically as part of a troubleshooting fix. As one example, a friend of mine was unable to get their Privacy preferences in Skype to stick. The settings kept reverting every time she quit Skype. A Google search revealed numerous users with the same symptom. One suggested solution was to make the changes when Skype is offline. If this doesn’t work, a last resort is to go to ~/Library/Application Support/Skype. Inside here, find the folder with your Skype name. Inside this folder will be a file called config.xml. Delete this file. You’ll next need to re-set preferences in Skype. However, they should now stick. In the book Skype Hacks, you can learn about further tweaks possible by editing, rather than deleting, this config file.
While you’re in Application Support, check out MobileSync/Backup. This is where the local backup files for your iOS devices are stored (as maintained via iTunes when you sync an iOS device). If nothing else, it’s a good idea to occasionally make a copy of these backups. That way, if the originals are accidentally deleted or get corrupted, you’ll still have a recent copy as a backup to the backup.
Tip: The names of the folders in the Backup folder don’t indicate the names of the backed-up devices. To determine this, match the modification date of a folder with the modification date of the device as listed in iTunes > Preferences > Devices.
4. Access iOS firmware updates in iTunes
Speaking of iTunes, the iTunes folder in the Library folder is where the firmware update files for your iOS devices are stored. When you update to new version of iOS (such as the forthcoming iOS 6), OS X deletes your old firmware files. You may prefer to save the old firmware, possibly to downgrade back to it if you have problems with the iOS version, or to use the file with a device that has not yet been upgraded. [Note: Downgrading is not easy to do, but it can be done.] Or perhaps you want to copy a current firmware file from one Mac to another, so you don’t have to re-download it on the other Mac. The .ipsw files, located in subfolders inside the iTunes folder, are the firmware update files. To help you match a file to its corresponding iOS device, check out this list of firmware updates.
5. Recover and Transfer Mail
In a recent column, I noted that upgrading to Mountain Lion deletes all the RSS items you may have stored previously in OS X’s Mail app. If you want them back, you be glad to know they are still on your drive. They’re stashed in your Home directory’s Library, in Mail/V2/RSS. The items are not organized in a way that allows you to easily locate a specific RSS item (to say the least!). But if it is critical to recover items, you could do so.
More generally, the Mail folder contains all the data used by OS X’s Mail app. If you wanted to temporarily switch from using Mail on your iMac to your MacBook, for a trip perhaps, you could copy the entire Mail folder from one Mac to the other, replacing the presumably data-empty folder on the MacBook with the copied folder. When you next launch Mail on your MacBook, all the items from Mail on your iMac should now be there.
6. Access iCloud via Mobile Documents
The Mobile Documents folder is a relative recent addition to the Library. But, if you use iCloud, it may be the most important one for you to know about. It’s where your iCloud-compatible apps keep local copies of the documents they save to iCloud. As such, any changes you make to the contents of this folder, such as adding or deleting a file from the Finder, will be reflected in iCloud and on other devices that sync to iCloud.
Jim Tanous advised accessing this folder to create a backup of all your iCloud-stored documents. You can also use this folder to locate certain iCloud-stored files that may not otherwise be easy to find. For example, Chris Breen explained how to locate PDF files that you created (and saved to iCloud) via printing to PDF from the Mail app.
I’ve previously described how you to use the Mobile Documents folder to transfer a file from one Mac to another via the Finder. As an alternative, you can install DropiCloud; this creates an iCloud-based folder that works like a stripped-down version of Dropbox.
A word of caution: Don’t get carried away with manipulating items in this folder. Especially do not move the Mobile Documents folder, or any of its subfolders, to a different location on your drive. A recent TUAW article details what can go wrong if do this. However, it’s worth noting that the author did things so far from the mainstream that I doubt anyone else would ever think of doing them quite that way. So I would not be overly concerned here.
Bottom Line: It pays to be cautious about anything you do in the Library folder. Still, this isn’t a reason to avoid the folder. Heck, it pays to be cautious about anything you do on your Mac, period. Accidentally deleting the contents of your Documents folder would likely cause much more pain than a misstep in the Library folder. That doesn’t mean you should avoid the Documents folder. Delving into the Library folder may not be for everyone. But almost everyone can benefit by knowing at least a bit about what’s inside this folder and what can be done with its contents. Now you do.
[Technical note: There are multiple Library folders in OS X. There’s one in at the root level (/Library) and another inside the System folder (/System/Library). Each user account has its own Library folder. This article refers only to the Library folder in your Home directory (~/Library)]