Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 working on external server - just doing some web-api there. Today when I wanted to use api php returned following error:

Unknown: write failed: No space left on device (28)

So I figured out that tmp is full:

~# df -h /tmp
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       102G   97G     0 100% /

So I guess I have to clear some trash in tmp - but first of all I would like to know what is causing the problem, I mean what takes so much memory in tmp? Maybe something is flooding tmp dir somehow? I am not expert in system administration I just write web-api... Is it normal that tmp size is exeeded? Maybe it just happens from time to time?

The command result:

du -sh /tmp/* | sort -h
0       /tmp/tmpEZIyDT
0       /tmp/unity_support_test.0
4.0K    /tmp/amazoncookie.txt
4.0K    /tmp/at-spi2
4.0K    /tmp/filewhHOLH
4.0K    /tmp/keyring-b3ZOTY
4.0K    /tmp/mc-domator
4.0K    /tmp/mc-root
4.0K    /tmp/pulse-2L9K88eMlGn7
4.0K    /tmp/pulse-PKdhtXMmr18n
4.0K    /tmp/ssh-thimUVhk2748
8.0K    /tmp/pulse-5N1YM8s2cT0i

Strange - as I understand not much things in tmp dir... maybe something else is taking so much disk space - how I can check it?

share|improve this question
up vote 7 down vote accepted

The first command indicates that /tmp is actually on the same filesystem as / (ie, everything else). If your root partition is full, it could be that other stuff (such as /var/log) is taking up space.

A decent way of finding things is to do

du -sc * .[^.]* | sort -n

to find what directories are big. Then you can continue to cd into lower directories and rerun the command to narrow things down.

share|improve this answer
Run a quick check over the contents of /var/log/ - If a program has been spewing gigabytes of unmonitored errors, this can quickly fill up a drive. – Darth Android Oct 18 '12 at 17:49
thanks - it was good idea of lookin for hidden files - the problem was huge file ".xsession-errors" in some users home dir - for now I just deleted it – user166241 Oct 18 '12 at 20:03

On a recent distro :

du -sh /tmp/* | sort -h

On a older distro :

du -csm /tmp/* | sort -n
share|improve this answer
I edited post - the result of first command is strange... – user166241 Oct 18 '12 at 17:36

Check if you didnt run out of inodes.

# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda3            1236992 1236992       0  100% /
tmpfs                1007716       1 1007715    1% /dev/shm
/dev/sda1              38456      45   38411    1% /boot
share|improve this answer
Above comment is for reference for ppl with the same problem – Zuzu Jun 24 at 0:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.