Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm about to run out of disk space, and I know I have a lot of junk on my macbook but I don't know how to find it to figure out how to delete it.

Is there an easy command line way through terminal to list my biggest files on my drive? Or is there a GUI program that could help me find all the offending huge files that I'm not using?

share|improve this question
1  
The easiest way to find large files is probably to sort files by size in list view after enabling calculating all sizes in the view options. See Reducing Lion OS Footprint by removing unnecessary files/folders for a list of common suspects for deletion. –  ؘؘؘؘ Jul 15 '12 at 12:25

12 Answers 12

up vote 22 down vote accepted

You can try :

share|improve this answer
4  
+1 for DaisyDisk. You don't even technically need to pay for it, just endure the 10-second nag on startup. –  Kyle Cronin Aug 30 '10 at 18:23
    
Or won it through MacHeist ;) –  Studer Aug 30 '10 at 18:47
    
DaisyDisk is brilliant! +1 –  conorgriffin Jan 31 '11 at 22:41
    
DaisyDisk took one of the views that WhatSize uses and made a very nice update. The app store version won't look at files as an administrator (root) or clean things out - so you might look for another tool if you want a cleaner / duplicate file finder. It does do pictures the best of any. –  bmike Jul 20 '11 at 21:22
    
+1 for daisy disk –  Nicholaz Jun 8 '13 at 19:10

I highly recommend GrandPerspective(Free). Just finding the largest files isn't always that useful: 20 gbs of 3mb music files wouldn't show up, for example. GrandPerspective gives you a great visual breakdown of your harddrive contents regardless of whether your wasted files are in one big .dmg or a few hundred small files or whatever. Further, if you know most waste is in, for example, your home folder, you can specify which directory to show. Screenshot of Grand Perspective

share|improve this answer

Omni Disk Sweeper by Omni Group is good at helping find the mountains of stuff.

I find that apps and the system folders generally don't take up that much space (everything being relative), that the real hogs are in the Documents, Music, and Movies folders of my user folder.

share|improve this answer

Start with Monolingual: http://monolingual.sourceforge.net/ it removes extra languages and locales from your computer. Saves quite a bit of space without any real loss of usability (unless you speak several languages and want to use them...)

share|improve this answer
4  
How much space does that actually save? –  Fishtoaster Aug 30 '10 at 19:08
    
I just ran it for the first time on my MBP... 990 MB were freed. –  Robert S Ciaccio Sep 2 '10 at 8:53
    
I just re-ran this on a MBA (selected more languages this time). 1.3 GB were freed. –  gary Jan 8 '11 at 13:06
    
Just saved 3.32 GB here :) –  Chris A Jan 28 '13 at 1:12

Two things...

  1. If you are starting to run out of disk space deleting files isn't going to help much unless you have massive amounts of waste, eg Old systems from doing an archive and install OS update.Start thinking about getting a bigger hard drive or some extra drives.

  2. In terminal type...

    du -hs *

This will list each directory with it's size. It will look smething like this...

3.6G    Desktop
3.9G    Development
 42G    Documents
1.6G    Downloads
4.5M    Dropbox

If anything looks unexpectedly large cd into the directory and run the command again. Rinse and repeat until you find what you are looking for.

share|improve this answer
    
This is not as elegant as the visual apps others recommend, but in my experience doing a command line du -hs * and drilling down is really the best way I have cleared up issues. Mainly because drives don’t fill up randomly with junk all over the place. It’s usually one or two large folders or even a log file growing out of control. I have cleaned up tons of Macs & Unix boxes this way. You haven’t lived until you have deleted a 43GB log file that has been growing for 5+ years! –  JakeGould Jan 28 '13 at 2:15

You can also set Finder to the horizontal list view (not sure what that view is called), enable the Size column (see View Options, CMD J), and select "Calculate All Sizes" again in the View Options window.

Now sort by size. Start off in your Home folder. See what sub-folders are biggest. Drill down and explore.

share|improve this answer

If you're looking for specific things to tear out, look at all the Garageband samples and support files. They take up a LOT of space, and if you're not going to be making music you won't miss 'em.

share|improve this answer

While I agree with all suggestions above regarding apps that help you to visualize what is taking space on your HDD, you may find yourself in situation where you actually can't delete those files and have to keep it on your hard drive.

In this case, you can use this utility - Squeeze to transparently compress your files in the background. It helped me to find couple of gigabytes of space without deleting stuff and I was able to use it on pretty old Macbook without any performance penalties.

share|improve this answer

The command line way of doing it would be

du -ksx /* | sort -n

this should be run as root (either in a root shell or with sudo) and gives you the sizes of the top-level directories sorted by size (and maybe some error messages about /dev/something).

Then you can refine with

du -ksx /Users/* | sort -n

and so on.

(using du -k instead of -h as proposed by Henry makes it possible to sort by size)

share|improve this answer

I owe a few of the free and paid apps mentioned here, and I find it odd that nobody mentioned Whatsize. I think it’s the one that displays the space in the best possible way. It’s not too “graphical” but then again, it shows you the numbers which are the important thing.

It’s not free, but I have used it extensively and it never disappoints me.

share|improve this answer

I really like What Size - it's also on the Mac App store, but has many features that won't be allowed on the store (like checking sizes as the administrator, and actually deleting / thinning files to remove code that can't possibly be run like PPC code on an intel mac).

enter image description here

It is paid software - but well worth the expense for me. I have used it over slow network connections, many external drives and my boot volume to see quickly where all the space is so I can know what is possible to clean up and when it's just not possible due to there being no huge folders or files that I can afford to remove.

enter image description here

The find duplicates function is great and there are many other views, but it's geared to giving you the biggest space users on top no matter what view you choose.

share|improve this answer

On Snow Lion or better, you can use afsctool (available through homebrew) to compress large files from the terminal.

It essentially does what ClustersApp(the aforementioned 'Squeeze') does, but free and without a pretty interface, unless you have a lovely Terminal.app theme.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.