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

We have a bunch of different applications running on a web server and some of them started falling over; Quickly checking disk space we realised the tmp folder on a seperate partition had become full - Looking through there's lots and lots of CGI****- files, where '' is a number and the last '' are 2 or 3.

I realise files in the temp directory aren't gaurenteed any permanent life so I could just delete them, but I wanted to check first - before I cause even more trouble :-p

I suspect they're related to Ruby on Rails and file uploads.

Cheers, Chris

share|improve this question

In theory you should be safe to remove anything in /tmp that is not currently in use, though to be safe I would leave anything less than a day or so old just in case. If you were to reboot this would probably happen automatically, as most modern distributions clear out /tmp (except very recent files) on startup.

You could set a cron job to delete files that are not recent from /tmp periodically, though it would be advisable to confirm where the files are coming from and try stop this happening again in future rather than just treating the symptom.

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.