The essential guide to deep-cleaning your Mac
9th Nov 2008 | 09:15
How to find the files that eat up space and slow you down
Apple pioneered the idea of a Desktop containing files and folders with the earliest versions of the Mac OS, and the basic idea has not only remained but also been adopted by practically every other computing system.
On a computer, it's hard to tell at a glance if a machine is chock-full of stuff. The Desktop might be neat and tidy, but just a few folders down the system could be overflowing with files.
Get the info
The Get Info window is your best friend when it comes to looking at the sizes of items on your Mac. You can select any item and press [Apple]+[I] to view its properties.
You can also view an item's size if you Quick Look a folder or drive in OS X 10.5 by pressing [Spacebar]. If you open any Finder window and choose List view, you can click the Size column to order the items by size, though you may have to activate View > View Options > Calculate All Sizes to force OS X to display folder sizes initially.
It may take a moment to update itself, but this will give you an overview of the biggest folders on the system, which are likely to be your User, Applications and Library folders. Within your User folder, probable culprits for clutter include your Documents folder plus all media folders – Music, Pictures and Movies. The more you work with any particular media, the more likely that folder is to be full.
OS X and the apps that run on it sometimes decide where to store things on the hard drive, because, in most cases, you wouldn't want to be prompted every couple of minutes and asked what you thought. These things build up over time and take up valuable space.
There are several usual suspects when it comes to gradual build-up, but they are easy to identify. If you use Apple Mail, you can soon accrue a lot of mails and, with attachments, these can start to take up more space than you realise. Go to your Home folder > Library > Mail and perform a Get Info on the Mail folder to see its size.
You may also see a Mail Downloads folder, containing those attachments you have chosen to save using Mail's Save button. Note that this isn't the best place to delete mail, just to view its size. To delete messages, open Mail and drag the relevant messages to the Trash folder, then empty it using Mailbox > Erase Deleted Messages or by right-clicking on the Trash folder.
To sort the messages and see all those with attachments – likely to be the largest in size – right-click in Mail's Subject bar and choose to view attachments, then click the new Attachments column to sort the list. Remember that if you're unsure about deleting mail, you can drag the messages into a folder on the Desktop first and burn it to a disc.
Microsoft Entourage keeps its mails in a big, monolithic database file, so the same procedure is necessary – drag mails to the Trash in Entourage and empty it.
Keep an eye on iLife
Each iLife app has its own Trash bin. So even if you empty the main Trash, deleted material from iLife programs may remain. To delete this material, locate the Trash in iPhoto, iMovie, iDVD and the others and manually empty it. Sometimes the Trash isn't obvious – in iDVD, choose Advanced > Delete Encoded Assets.
iTunes is a space hog; music, videos and podcasts linger even if they're never played. Find out whether you have iTunes set to copy music when you add it. Go to Preferences > Advanced and look for Copy files to iTunes Music folder when adding to library.
If this is switched on and you have been dragging folders of music into iTunes, it will have been duplicated; iTunes will be playing the version it placed into the music folder, not the original. In this case, locate the originals by running a Find and delete them.
If this option is off, iTunes will be playing the originals, wherever they are, so be careful what you delete. Deleting tracks from playlists in iTunes doesn't remove them from the library.
To permanently remove them you need to go to the main Music list at the top-left and delete them from there. This also applies to videos which you can delete from the Movies section, and both techniques must also be used on iPods to permanently delete material, unless you have syncing switched on.
Podcasts can also become terrible space hogs, so manually delete these from the Podcasts section, and also use the Podcast Settings menu to make iTunes only keep recent episodes. If you want to back up music, podcasts or videos, either drag them to Finder and burn to disc, or burn via the File > Library > Back up To Disc command in iTunes.
How to find large files using WhatSize
1. Download and install WhatSize from the disc. The license allows unlimited measuring and the free trial allows up to 20GB of measurement. Physical volumes are shown at the top-left and major folders displayed beneath them. Select a drive and the program will begin to measure it. Folders shown in red are waiting to be calculated.
2. Folders are listed in order of size and shown in Column view so it's easy to spot the space hoggers. Here, for example, the GarageBand loops are taking up over a gigabyte of space. If you want you can select a folder and use the delete command in WhatSize, though you should be careful not to throw away anything vital to the system.
3. There are several views available including a pie chart option to show you how space is used. Laptop users note: the large sleepimage file in private > var > vm is normal and does not need to be deleted. This is a file equivalent to the amount of RAM that your laptop uses to preserve data in the event of a battery drain.
Freeing up space
Once you have identified the culprits that are eating up space on your Mac's hard drives, it's time to do something about it.
Some data you can delete, but before deleting you may want to back it up, either for safety reasons or because it's data that you still need but you don't need immediate access to.
Old work and email files, old pictures and finished projects are all examples of material that needs to be archived. If you are running OS X 10.5 you will be able to take advantage of Time Machine, which performs incremental backups and will let you find items even if they've since been deleted from your main drive.
Time Machine, however, is more about security of backups than archiving data, so there are some other, better techniques to use to achieve this.
Burn data to disc
All Macs come with a disc burner and most from the last few years will be able to burn DVDs as well. Dumping data off a hard drive onto discs is a good way to create a "hard" copy for archive purposes, though it's advisable to get better quality discs and burn them at lower speeds to minimise the chance of any errors.
CDs typically hold 750MB, some up to 800MB, but for any media files like video or music, DVD is the better option simply because a standard disc holds 4.4GB. When Blu-ray drives are introduced to Macs, which surely must happen soon, you'll be able to get 25GB on a disc or 50GB on a dual-layer disc.
Even that pales next to the storage capacities of external hard drives, which are preferable for really large data dumps like copying an entire iTunes library prior to pruning it back, for example, just in case you delete something you didn't mean to. Or, for backing up items like large Photoshop, music or video projects where accessing the data from an optical disc can be painfully slow.
Get a cheap external drive
USB 2.0 and FireWire hard drives are now so big and so cheap that they can conceivably be both a Time Machine backup drive and a general purpose archiving hard drive at the same time.
A quick search reveals several 1TB models for around £100. At ten pence per gigabyte that's incredibly cheap. At these prices you can have a 500GB or 1TB external drive connected to your Mac and just use it to store all non-essential items, keeping your boot drive nice and lean.
As we have seen, media files, emails and documents can be sorted, backed up and then deleted easily, and certainly this will reclaim a lot of space back on your system. Under the hood, however, there's a lot of activity that isn't directly visible to the user, and which can result in additional clutter. Having a huge iTunes or iPhoto library may slow down their launching times, but clogging at the system level can affect OS X itself negatively in terms of speed and stability.
In order to function properly, the system must write files to the hard drive all the time. These files take various forms – temporary files, logs, caches and more. In the short term, they can help with remembering settings and recent tasks.
In the longer term, they can start to occupy more space than you would ideally like. Curiously, OS X doesn't have a built-in tool to clear out these files, and most people aren't comfortable with using Terminal to do it.
Help is at hand, though, in the form of various third-party utilities, the best of which is OnyX. Best not just because of its design, but because it's free and on this issue's disc.
Clean up with OnyX
If you download the correct version for your flavour of OS X, you can use its Cleaning section to dig out all the system stuff that has built up, much of which will be obsolete.
The Internet tab lets you delete all web browser history, caches and form values. Caches helps you to clear out any troublesome cache files that may have become corrupted. Logs will remove the many small text files that OS X writes as actions like crashing or software installation occur.
Finally Trash lets you empty the main Trash, and in the Misc tab you'll find the option to delete things like downloaded Mail attachments and previous iTunes libraries. After these it's recommended to restart, and if you monitor the size of the hard drive you'll find that there is more free space after restarting. How much exactly will depend on how much clutter was on your system.
There are some other good tips for reclaiming space. If you have had your Mac from new and it came with iLife preinstalled, you will almost certainly have the GarageBand library and iDVD themes occupying a few GBs of space. If you don't want to use the content that comes with these programs, delete them.
They can be reinstalled later from the iLife DVD if you change your mind. GarageBand's loops can be found in User > Your Username > Library > Audio > Apple Loops and iDVD's themes in User > Your Username > Library > Application Support > iDVD > Installed Themes.
If you are using software that has large libraries – music software for example – store these on secondary or even tertiary internal hard drives if you have a tower system, or on FireWire or USB 2.0 external drives. This keeps them off the boot drive but still accessible. Internal hard drives are very cheap and come in huge capacities.
Also, if you are working with Photoshop or Final Cut, keep an eye on the scratch disk settings. This is where the app stores data temporarily as you work with it, but it doesn't always get deleted when you quit. Large scratch disk folders can be easily identified and deleted.
How to back up files to a DVD using either Finder or Toast
1. Finder supports native CD and DVD burning so you can perform basic burns without any additional software. In System Preferences > CDs & DVDs, make sure your Mac is set to open Finder when blank discs are inserted. Then when you insert a disc, simply drag files and folders onto it and choose File > Burn Disc.
2. If you have Toast (£70, www.roxio.co.uk) or Disco ($30 (£17), www.discoapp.com) you get more options. In System Preferences you can tell the Mac to open your desired burning app when you insert a disc. Choose a disc type – Mac & PC is generally the best – and drop items into the window. Click the Size column to sort the list by size.
3. In Toast's Recorder Setting menu you can access advanced parameters for your burner. This includes the write speed; if you're in a hurry, choose the fastest speed. If you've had reliability problems with discs not burning properly, choose a slower speed. You can also choose to write a session and continue burning on that disc later.