Server Fault is a question and answer site for system and network administrators. 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 new to linux.

I hope to install openvpn on my dedicated server. When I maked lzo/openvpn project, it said that there are 2 error, the reason is'No space left on device' I checked /tmp directory. The /tmp patrition space limitation is 1012M , used 925M

It looks like the directory/partrition is almost full.

What is the solution for this? clear /tmp directory or any other way?

Welcome any comment

Thanks interdev

share|improve this question

migrated from Dec 3 '10 at 7:56

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

For ways of safely tidying up /tmp, have a look at Wipe out /tmp every week? . Failing that, use du -sk /tmp/* | sort -n to identify the big files and subdirectories in your /tmp, and think carefully about what you can safely remove before doing so. There's no magic recipe to identifying what's safe to remove, but common sense and careful thought will help a lot.

share|improve this answer

You might also investigate if there is a binary package by the Distribution your Linux installation is based.

OpenVPN should be pretty common in modern distros.

Nothing to do with the primary question but might be helpful anyway

share|improve this answer
I used different version to install, same report – user62414 Dec 3 '10 at 8:16

This belongs on superuser, however you should just clear /tmp.

share|improve this answer

Could you sort files by size to view what is fulling your /tmp maybe some softwere usuing space on /tmp for logs

share|improve this answer

You could clear this directory :

echo "Emptying /tmp"
rm /tmp/* -rf &1>2 > /dev/null

You could also set TMPTIME=7 in /etc/default/rcS so that only stuff older than 7 days is deleted when you reboot.

share|improve this answer
Will the files in /tmp be removed automatically when rebooting the server? – user62414 Dec 3 '10 at 8:04
yes, with TMPTIME=7 files older than 7 days are automatically deleted every reboot – aleroot Dec 3 '10 at 9:43
it depends on the distro. – MadHatter Dec 3 '10 at 10:20

can you run "df -k /tmp" - is /tmp on the "/" filesystem , or is it on its own filesystem ? If it is on the "/" filesystem , its perfectly reasonable for it to be as large as this.

share|improve this answer

You don't know what files in /tmp may be in use by the system. Reboot first, then delete any files pre-dating the reboot from /tmp (or anything more than 1 day old). Then for good measure, reboot again.

Although for the longer term, you need to start keeping an eye on what files are in /tmp and work out why they're not getting cleared down automatically.

share|improve this answer

Reboot the server Then execute find /tmp -mtime +1 -delete This will safely delete any file older than 1 day in your /tmp If this is still not enough open the file /etc/fstab and comment the line referring to tmp Reboot Now your tmp doesn't use a separate partition and it is writing on the root drive. Try to install again. Revert the changes in /etc/fstab once you are done. If you are still facing the same problem after this then you should really make some space.

share|improve this answer

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.