I had a bunch of files in /tmp that I cleared up by doing $ rm -rf ./tmp/*. However, I'm still unable to 'clear' that information, even after a reset. Here is what I have now:

$ cd Av-bash: cannot create temp file for here-document: No space left on device
$ df -i
df: no file systems processed

I should have roughly 400GB free space on this machine. How can I clear up this space, what do I need to do so that I can create temp files once again? And why isn't df -i returning anything?

The distribution I'm using is:

Linux version 3.13.0-29-generic (buildd@toyol) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014

rm doesn't clear files, it unlinks them. If there were files in /tmp open by some processes that are still running, their space hasn't been released. One way to fix the issue is to restart these applications if you can identify them. A simpler workaround is to reboot your OS.

There can be a different source of a /tmp full situation. If /tmp is based on tmpfs, you might just be out of virtual memory.

  • 1
    They should also use lsof -n | grep -i delet releated to your good suggestion about deleted files that were in use. – Aaron Feb 21 '16 at 19:58
  • Another good answer for this at unix.stackexchange.com/questions/68523/… – Tom Harrison Jr Feb 21 '16 at 20:13
  • Linux Distribution added in the question. It's ubuntu. – David542 Feb 21 '16 at 22:24

you can use following command which will remove everything from /tmp directory which were last modified before 24 hours.

tmpwatch --mtime --all 24 /tmp
  • 1
    I see no evidence suggesting this would help at all. – kasperd Feb 22 '16 at 10:47
  • please see the redhat archive page, link is gien below redhat.com/archives/rhl-list/2004-January/msg04730.html – ASEveryWhere Technologies Feb 23 '16 at 9:21
  • How does that differ from what was tried already? – kasperd Feb 23 '16 at 9:28
  • one problem has many solutions, so i suggested one of them !! – ASEveryWhere Technologies Feb 23 '16 at 12:18
  • Except what you have provided is not one of the solutions for the problem described in the question. Pay close attention to what was already tried, and why it did not work. – kasperd Feb 23 '16 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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