Periodically people may find that their available hard-drive space has significantly diminished. There are a variety of reasons why this can happen, which can be anything from an error in the drive to a user mistake. I knew someone who once inadvertently duplicated her whole (and relatively large) home folder to the root of the drive, and have seen other people do similar things that go unnoticed for a while.
Managing files and folders
Low drive space can cause performance problems (spinning color wheels, churning drive platters, among other pauses and slowdowns), so it is good to have a grasp on what files you have on your drive, where they are, and how much space they are taking up. This will help you prevent low drive-space problems, that can happen in the middle of tasks if the drive is already low on space and you copy, download, or otherwise quickly generate a large amount of data on your drive that encroaches on the available space for virtual memory.
There are many reasons why hard drive space can suddenly seem to decrease, but here are a few of them:
Multiple failed installation attempts
Some people have had this happen after having failed attempts to install applications on their computers. Apple's installer utility should overwrite existing installations with fresh ones (unless told to install in an alternate location), if an application has its own installer, but there may be a chance multiple installation attempts will result in multiple copies of the program on the drive, especially if the installation gets canceled halfway through.
Though most programs are relatively small, some large creative professional suites can be well over 10GB in size.
Importing large media libraries
A more common reason for space loss is when people use media-management programs like iPhoto and iTunes that will copy imported files to a structured library. If you have a collection of large items you are importing into these programs, you may find them to be copied to the library instead of moved there. Additional, once in a library some items will be duplicated multiple times (in iPhoto, for instance) so you will keep original items when performing edits. With photos that are in RAW or other large formats, this can result in a massive amount of space being used.
Neglected downloads or scratch folders
Safari and other applications may download files to your Downloads folder, and if you continually download large files to this folder you may overlook them when searching through your working directories and other common storage locations. Additionally, some programs may create scratch folders in relatively hidden locations such as the Application Support folder in the user library, so be sure to check the library for large storage folders. I have had applications regularly download files to this folder, and over time they build up to tens of gigabytes.
If you have installed Boot Camp on your system, the OS X partition will have been resized. Apple by default will use 32GB for the Windows partition, but users can expand this if desired. The OS X partition will subsequently be reduced in size, and may appear as though you have lost a significant amount of space.
VM drive images
In my testing of various operating systems using both Parallels Desktop, VirtualBox, and VMWare Fusion, I realized that my VM installations wound up using a massive amount of drive space. Not only will each virtual machine take up a lot of space on its own, but each VM program will require a separate VM image for that program. As you use your VMs, migrate them to different VM applications, or create more VM installations, the VM images will start to take up many gigabytes of space.
How to detect where space has gone
Whereas iTunes and other media managers may have "Find Duplicates" or similar features, the Finder does not. Additionally, in the Finder you cannot easily determine file sizes at first glance. You can calculate sizes in the List view mode or by getting information on items, but this will take some time and not give you a global picture of where space is being used. Therefore, the only practical way to do this is to use a drive-size management utility.
In the past we have covered a few of these utilities, but here they are:
This is my favorite! It is a lightweight freeware utility that outlines file sizes starting from any specified folder, and displays them as proportionally sized boxes, colored and lumped together by common parent folders.
The Omni group was one of the first organized development teams for OS X applications, and when OS X first came out, they had a number of utilities and programs available for the platform. OmniDiskSweeper allows you to quickly list all files by size in a column browser, and be able to isolate which files and folders are using the most space. While graphical options like Grand Perspective show a snapshot of a folder tree, this brings all large files to the top of a series of lists.
WhatSize is a popular option, that offers a blend of list views as well as a graphical representations of folder trees. In my experience I like the visual organization of Grand Perspective better than the pie-chart view in WhatSize, but both work well and may appeal differently to folks.
DaisyDisk is similar to WhatSize in its graphical representation of file sizes. Instead of a list of files, it offers a list of disks from which you can scan and then interact with files through the graphical representation. The graphic eye candy makes it more intuitive than some other options, and you can directly access corresponding files for manipulating and previewing before deleting them.
Beyond files and folders
Sometimes the amount of space being used on the drive is not to blame for space loss. Though rare, there may be instances where an improperly structured volume or partition map could be displaying an incorrect volume size. Additionally, bizarre behaviors can occur where upon deleting files the system will unlink it and not have it available anymore, but the drive will not show any additional free space. As new files are created and then deleted, the available space on the drive will become smaller and smaller.
If these problems occur, the best thing to do is first back up your system, as file-system corruption can quickly lead to data loss. Then try running several drive-management utilities to fix the volume structure. While Apple's Disk Utility is a good option to start with, it is not the best. Our recommendation is to get a robust utility like DiskWarrior, TechTool Pro, Drive Genius, or Disk Tools Pro, and run these programs on your hard drive when booted off an alternate volume.
An easy way to do this is to install the program and clone your drive to an external disk (use Carbon Copy Cloner or SuperDuper!), then boot off the external drive (hold Option at start-up to select the drive) and run the drive utility from there. This has the added benefit of backing up all your data before tampering with the partition, but you can also create boot DVDs with these programs, as well as connect your Mac to another when in Target Disk mode and run the program from the second Mac.
Even a fully intact partition map and volume structure may still show a reduced volume size. If you have partitioned your drive for Boot Camp or to create a storage drive, upon deleting that partition if you have not resized the remaining partition, then it will stay at its smaller size and not reflect the full capacity of the drive. You can check this using Disk Utility, by selecting the drive device and then clicking the "Partition" tab to see how volumes are mapped to the drive.
Lastly, many times temporary files such as system caches can take up a lot of space. Using a maintenance and cleaning utility to clear the hard drive of these files will provide some temporary space improvements, though keep in mind that this space will eventually get used up again. However, you should be able to maintain it by regularly running the cleaning routines.