Recommended hard drive diet?

Clive Menzies clive at clivemenzies.co.uk
Fri Dec 15 09:43:04 UTC 2006


On (15/12/06 09:44), Eberhard Roloff wrote:
> David Armour wrote:
> 
> > Hello list!
> > 
> > They Thought It Would Never Happen Dept.:
> > 
> > Incredibly, my 30G hard drive has less than 1G remaining free space! The
> > mind boggles, and I've come over all twitterpated-loik. Lacking, however,
> > this close to Giftmas the disposable fifty or so to buy a replacement --
> > and probably much larger hard drive! --, I'm keen to learn what the
> > hive-mind might consider "best practice" for putting a small-to-middling
> > hard drive with a single-user, edgy system, generic box with vanilla
> > cd-burner on a reducing plan? What to do? What to do first? I can see, for
> > instance, that I don't have to have all those children grad photos on
> > there, or an assortment of '60s music, but what constitutes
> > "stripped-down" these days?
> > 
> > As always, any responses greatly appreciated.
> 
> I would try to tackle this from the bottom up.
> 
> df -h 
> shows you all your partitions on your disk, their respective sizes and what
> percentage of that space is in use.
> 
> Now, let's assume that your home directory is the place that needs to slim
> down. 
> Just in case, your problem is located elsewhere, synaptic is your friend.
> 
> For an overview of filespace usage in my $home, I personally prefer kdirstat
> to show me in detail, which directory is eating up my space.
> Surely you can do this with a bunch of other tools and on commandline. I
> prefer to do it graphically to have a comfortable overview when it comes
> down to deleting files that I kept for so long....

As root or sudo:

# du -h --max-depth=1 /

will show which topline directory is taking up space; you can then work
iteratively through directories to locate the space hogs.  eg if /home
is large

# du -h --max-depth=1 /home 
will show where in /home

You could also use deborphan to identify libs and packages you're not using:

$ deborphan
will show unused libs

$ deborphan -ap5
will show the least important packages installed (-ap1 the most important) - see man deborphan.

Regards

Clive

-- 
www.clivemenzies.co.uk ...
...strategies for business






More information about the ubuntu-users mailing list