Running out of space

I just did a "df" and found that I'd reached 97% on /. I found a few large media files and the apache logs to delete that brought it down a bit, but are there any other files, such as other logs, that I should look for? I would esp. like it if there was some list somewhere of what to look for on a Debian system to free up space.

5 Replies

du -h –max-depth=1 /

will give you a list of the size of each top level directory. Continue the process down one level to find the biggest folders on the system.

How is your disk partitioned? My Linode has all sorts of extra packages on it that I've installed over the last few years, and I'm still only using about 5GB total–more than half of which is mail.

From your post, it sounds like you are surprised that the / partition is full, which leads me to think that it may have been created too small. If that's the case, Linode has a nifty little utility to resize ext2/ext3 filesystems. Don't forget to shutdown first if you decide you need to resize though. Resizing mounted filesystems is A Bad Thing (TM)


"sudo apt-get clean"

By default, apt keeps the .debs you download, in case you want to install them again - and sometimes you do: consider trying several different packages that do "foo". They might have similar library dependencies, and you wouldn't want to re-download all those libraries every time you "apt-get purge foo1; apt-get install foo2". Anyway, 'apt-get clean' deletes all those extra .debs. You can configure aptitude (and possibly apt-get) to do this automatically.

One of the many reasons why I slice up my drives, you really should have /var/log on it's own slice ;)

Find top 10 directories using disk space…

du -x --block-size=1024K | sort -nr | head -10


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct