Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running Ubuntu 10.04 on one 80GiB disk partitioned as two equal. The second one is mounted as my home folder. The reasons for the partitioning are historic and I don't think they're relevant here.

My problem is that Ubuntu frequently reports 'Low Disk Space'. The initial solution was to turn off backups and that seemed to ease the problem. Now it has started happening again, but backups are still turned off.

I can't see anything unusual in the tmp directory - or anywhere come to that - but I don't really know where to look.

I have searched for known leaky problems but haven't found anything that seems to fit.

I don't store images, videos or music.

Any ideas?

share|improve this question

migrated from Sep 20 '10 at 9:03

This question came from our site for professional and enthusiast programmers.

This question is not programming related, so it should be moved to – sloth Sep 20 '10 at 8:32
I realise that, but there are also a lot of Ubuntu users here who might have some insight into my problem. – Leo Sep 20 '10 at 8:38
up vote 3 down vote accepted

Log in as root then do a cd / and run:

(du -x -s * | sort -n -k1 ) 2>/dev/null

This will give you the list of what takes up the most space with the largest at the bottom.

The cd into that directory and run it again. You can basically follow it down as far as you want until you find the offending area (if any).

share|improve this answer
Great tip, though how can we see hidden directories? – Delan Azabani Sep 20 '10 at 8:32
I usually do something like "du -m --max-depth=4 /some/directory/tree | sort -nr | head -n 20" to see top 20 directories, output in megabytes. That shows hidden directories/files, too. – Janne Pikkarainen Sep 20 '10 at 9:17
Okay, I did this and eventually found that Simple Backup appeared to have created temporary files that it then left lying around. Not good. As I haven't used SB for a while, though, and my HD is still being eaten, I'll keep an eye on this thread and report back with any updated info. Thanks. – Leo Sep 24 '10 at 13:08

Using baobab (Disk Usage Analyser) is very helpful in determining where all the mystery space is.

For example:

enter image description here

share|improve this answer
Actually I should have known there'd be a GUI tool that's better that the du solution. +1. – paxdiablo Sep 20 '10 at 8:33
Thanks. Pics added too :) – Delan Azabani Sep 20 '10 at 8:34
Unfortunately, because the partition mounted as home is relatively empty, it's difficult to drill down to the problem with baobab. (used: 31.8GB available 39.5GB) – Leo Sep 20 '10 at 8:36
@Leo: I don't understand, the default is to open in the home but you can select the whole system to scan. – Phil Hannent Sep 20 '10 at 8:52

You can type simply

du -Sx | sort -rn | head -n 10

And it will display the 10 files on your server that are using the most space.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .