Cleaning Up Disk Space on OS X

October 14th, 2007 § 1 comment

Unfortunately, there is no quick and easy "Disk Cleanup" wizard for OS X. I have noticed my disk storage shrinking, and wanted to know what was occupying this space. I set out to figure out what was taking up space on my hard disk so I pulled up a terminal, entered the Unix world, and started digging.

I started out with "sudo du -h -d 1 /" which gave me the following results:

jason-burns-computer:~ jasonburns$ sudo du -h -d 1 /
Password:
133M /.Spotlight-V100
20K /.Trashes
1.0K /.vol
10G /Applications
3.4M /Archive Files
1.5K /automount
6.7M /bin
4.0K /cores
2.0K /dev
2.1G /Developer
11G /Library
2.0K /Network
4.1G /private
4.4M /sbin
2.3G /System
37G /Users
954M /usr
32K /Volumes
67G /
jason-burns-computer:~ jasonburns$

This didn’t give me all the detail I need, but it’s a great place to start. It appears that on my system, the majority of the 67GB used, is being taken up by my Users folder, so let’s start there. In order to catalog the Users folder for me, I ran the following command "sudo du -h -d 1 /Users/jasonburns/" with the following results:

jason-burns-computer:~ jasonburns$ sudo du -h -d 1 /Users/jasonburns/
4.0K /Users/jasonburns//.config
1.6M /Users/jasonburns//.easyeclipse-expert-java-1.2.1
8.0K /Users/jasonburns//.realobjects
0B /Users/jasonburns//.Trash
23M /Users/jasonburns//Applications
76K /Users/jasonburns//Desktop
44M /Users/jasonburns//Development
28G /Users/jasonburns//Documents
64M /Users/jasonburns//Downloads
552M /Users/jasonburns//Library
288K /Users/jasonburns//Movies
6.4G /Users/jasonburns//Music
1.7G /Users/jasonburns//Pictures
7.7M /Users/jasonburns//Podcasts
56K /Users/jasonburns//Public
80K /Users/jasonburns//Sites
128K /Users/jasonburns//workspace
37G /Users/jasonburns/
jason-burns-computer:~ jasonburns$

Now we are getting somewhere! My Documents folder is a whopping 28 Gigabytes!!! I dig a little further to find 98% of that is living in the Parallels folder. Upon further looking I saw that my two Windows XP installs in Parallels, one for work, one for home, were taking up 17 GB and 12 GB respectively.

I realize there isn’t much I can do about those particular setups outside of optimizing the Windows installs and recompacting the virtual drives, but the key here is how to use the du utility to find out quickly what is taking up your hard drive on OS X.

 

§ One Response to Cleaning Up Disk Space on OS X

  • Dom says:

    Hey Jason.
    Glad to see you’re finding that disk space. I’m often finding my drive shrink without noticing.

    You should check out a free app called WhatSize? at http://www.id-design.com/software/whatsize/
    Its a really simple tree style viewer that arranges folders by size, like the column view in Finder. I found it really useful to find some spare room, like 2.5Gb of FCE rendered files.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

meta