Where did all my space go?
Over the last little while, I’ve started to suffer from lack of space on the hard disk in my laptop, which is ridiculous, since there’s an 80GB disk in there and there is no way I have that much data I need to hang on to. I decided to do something about it last week. The main part of the problem was to figure out what was eating all the space:
tells you exactly what’s using how much, but it’s hard to get a feel for where your space has gone by scanning through pages of
output. So I built a program to help.
spaceviz is a small Python program that takes the output of
, and builds you a picture and HTML client-side imagemap of your space usage like this one:
Running it against the output of
showed me very clearly where all the space had gone: not only did I have a few seasons of various TV shows on my disk (which I already knew were there), but I had 11 GB of unneeded gzipped RDF data left over from a project that finished earlier this year (that I had forgotten about). Instant win!
, and run
make veryclean all ROOT=/
with a definition of
that points at the directory tree you want to generate usage data for. The makefile will take care of running
for you. Edit the settings for
to change the dimensions of the generated picture.
The program runs not only on Linux without fuss, but also on OS X so long as you have the
port installed to convert the python-generated PPM file to a browser-accessible (and much more efficiently compressed!) PNG.